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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user