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

session: fix persist on empty file

This commit is contained in:
bbedward
2026-01-05 09:07:00 -05:00
parent c1d95a3086
commit 0236fe3276
3 changed files with 21 additions and 15 deletions

View File

@@ -158,12 +158,7 @@ Singleton {
function parseSettings(content) {
_parseError = false;
try {
if (!content || !content.trim()) {
_parseError = true;
return;
}
let obj = JSON.parse(content);
let obj = (content && content.trim()) ? JSON.parse(content) : {};
if (obj.brightnessLogarithmicDevices && !obj.brightnessExponentialDevices) {
obj.brightnessExponentialDevices = obj.brightnessLogarithmicDevices;