1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Change variable names

This commit is contained in:
asmsuechan
2017-08-10 23:30:42 +09:00
parent 6e2e48fa64
commit 821a7c780e

View File

@@ -60,14 +60,13 @@ function _save (config) {
} }
function get () { function get () {
const storedConfig = window.localStorage.getItem('config') const rawStoredConfig = window.localStorage.getItem('config')
const storedConfig = Object.assign({}, DEFAULT_CONFIG, JSON.parse(rawStoredConfig))
let config = storedConfig let config = storedConfig
try { try {
const boostnotercConfig = RcParser.parse() const boostnotercConfig = RcParser.parse()
config = assignConfigValues(storedConfig, boostnotercConfig)
config = Object.assign({}, DEFAULT_CONFIG, JSON.parse(storedConfig))
config = assignConfigValues(config, boostnotercConfig)
if (!validate(config)) throw new Error('INVALID CONFIG') if (!validate(config)) throw new Error('INVALID CONFIG')
} catch (err) { } catch (err) {