Skip to content

Commit 24e487c

Browse files
committed
🐛 Fixes item size/ layout buttons (#629)
1 parent 064c644 commit 24e487c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/utils/ConfigAccumalator.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ export default class ConfigAccumulator {
4040
usersAppConfig = appConfigFile;
4141
}
4242
// Some settings have their own local storage keys, apply them here
43-
usersAppConfig.layout = appConfigFile.layout
44-
|| localStorage[localStorageKeys.LAYOUT_ORIENTATION]
43+
usersAppConfig.layout = localStorage[localStorageKeys.LAYOUT_ORIENTATION]
44+
|| appConfigFile.layout
4545
|| defaultLayout;
46-
usersAppConfig.iconSize = appConfigFile.iconSize
47-
|| localStorage[localStorageKeys.ICON_SIZE]
46+
usersAppConfig.iconSize = localStorage[localStorageKeys.ICON_SIZE]
47+
|| appConfigFile.iconSize
4848
|| defaultIconSize;
4949
// Don't let users modify users locally
5050
if (appConfigFile.auth) usersAppConfig.auth = appConfigFile.auth;
@@ -60,7 +60,7 @@ export default class ConfigAccumulator {
6060
try { localPageInfo = JSON.parse(localStorage[localStorageKeys.PAGE_INFO]); }
6161
catch (e) { ErrorHandler('Malformed pageInfo data in local storage'); }
6262
}
63-
const filePageInfo = this.conf ? this.conf.pageInfo || {} : {};
63+
const filePageInfo = this.conf?.pageInfo || {};
6464
return { ...defaultPageInfo, ...filePageInfo, ...localPageInfo };
6565
}
6666

0 commit comments

Comments
 (0)