Skip to content

Commit

Permalink
#801 fix change request
Browse files Browse the repository at this point in the history
  • Loading branch information
CalamityC committed Nov 23, 2023
1 parent c468783 commit a553038
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions rdmo/management/assets/js/store/configureStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,21 @@ export default function configureStore() {
const updateConfigFromLocalStorage = () => {
const ls = {...localStorage}
Object.entries(ls).forEach(([lsPath, lsValue]) => {
const path = lsPath.replace('rdmo.management.config.', '')
let value
switch(lsValue) {
case 'true':
value = true
break
case 'false':
value = false
break
default:
value = lsValue
if (lsPath.startsWith('rdmo.management.config.')) {
const path = lsPath.replace('rdmo.management.config.', '')
let value
switch(lsValue) {
case 'true':
value = true
break
case 'false':
value = false
break
default:
value = lsValue
}
store.dispatch(configActions.updateConfig(path, value))
}
store.dispatch(configActions.updateConfig(path, value))
})
}

Expand Down

0 comments on commit a553038

Please sign in to comment.