aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/notification-i18n-loader.js4
-rw-r--r--src/lib/persisted_state.js12
2 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/notification-i18n-loader.js b/src/lib/notification-i18n-loader.js
index 71f9156a..d7a4430d 100644
--- a/src/lib/notification-i18n-loader.js
+++ b/src/lib/notification-i18n-loader.js
@@ -3,8 +3,8 @@
// meant to be used to load the partial i18n we need for
// the service worker.
module.exports = function (source) {
- var object = JSON.parse(source)
- var smol = {
+ const object = JSON.parse(source)
+ const smol = {
notifications: object.notifications || {}
}
diff --git a/src/lib/persisted_state.js b/src/lib/persisted_state.js
index 24b835da..c73a38ec 100644
--- a/src/lib/persisted_state.js
+++ b/src/lib/persisted_state.js
@@ -5,10 +5,12 @@ import { each, get, set, cloneDeep } from 'lodash'
let loaded = false
const defaultReducer = (state, paths) => (
- paths.length === 0 ? state : paths.reduce((substate, path) => {
- set(substate, path, get(state, path))
- return substate
- }, {})
+ paths.length === 0
+ ? state
+ : paths.reduce((substate, path) => {
+ set(substate, path, get(state, path))
+ return substate
+ }, {})
)
const saveImmedeatelyActions = [
@@ -30,7 +32,7 @@ export default function createPersistedState ({
key = 'vuex-lz',
paths = [],
getState = (key, storage) => {
- let value = storage.getItem(key)
+ const value = storage.getItem(key)
return value
},
setState = (key, state, storage) => {