Skip to content

Commit

Permalink
Fix possible access to null newLayerNames
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Apr 23, 2024
1 parent 5e6a9db commit 030e2db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions actions/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ export function setCurrentTheme(theme, themes, preserve = true, initialView = nu
return [...res, layerConfig];
}
}, []);
}
const diff = Object.keys(missingThemeLayers).filter(entry => !(entry in newLayerNames));
if (!isEmpty(diff)) {
dispatch(showNotification("missinglayers", LocaleUtils.tr("app.missinglayers", diff.join(", ")), NotificationType.WARN, true));
const diff = Object.keys(missingThemeLayers).filter(entry => !(entry in newLayerNames));
if (!isEmpty(diff)) {
dispatch(showNotification("missinglayers", LocaleUtils.tr("app.missinglayers", diff.join(", ")), NotificationType.WARN, true));
}
}
finishThemeSetup(dispatch, newTheme, themes, layerConfigs, insertPos, permalinkLayers, externalLayerRestorer, visibleBgLayer, initialTheme);
});
Expand Down

0 comments on commit 030e2db

Please sign in to comment.