1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

settings: prevent overwrites if parse called with null object

This commit is contained in:
bbedward
2026-01-02 15:45:31 -05:00
parent 3e1c6534bd
commit 6cff5f1146
3 changed files with 15 additions and 10 deletions

View File

@@ -798,9 +798,9 @@ Singleton {
Store.parse(root, obj);
if (obj.weatherLocation !== undefined)
if (obj?.weatherLocation !== undefined)
_legacyWeatherLocation = obj.weatherLocation;
if (obj.weatherCoordinates !== undefined)
if (obj?.weatherCoordinates !== undefined)
_legacyWeatherCoordinates = obj.weatherCoordinates;
_loadedSettingsSnapshot = JSON.stringify(Store.toJson(root));