We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da21770 commit 18581afCopy full SHA for 18581af
ts/ui/menu/Menu.ts
@@ -1015,10 +1015,11 @@ export class Menu {
1015
*/
1016
protected mergeUserSettings() {
1017
try {
1018
- const settings = localStorage.getItem(Menu.MENU_STORAGE);
1019
- if (!settings) return;
1020
- Object.assign(this.settings, JSON.parse(settings));
1021
- this.setA11y(this.settings);
+ const json = localStorage.getItem(Menu.MENU_STORAGE);
+ if (!json) return;
+ const settings = JSON.parse(json);
+ Object.assign(this.settings, settings);
1022
+ this.setA11y(settings);
1023
} catch (err) {
1024
console.log('MathJax localStorage error: ' + err.message);
1025
}
0 commit comments