mirror of
https://github.com/koloml/philomena-tagging-assistant.git
synced 2026-11-07 16:18:19 +00:00
Fixed error triggered when empty string is parsed as null
This commit is contained in:
1 parent
81c66134a1
commit
e1026fd108
1 file changed
+4
@@ -93,6 +93,10 @@ class MaintenanceProfile extends StorageEntity {
|
||||
try {
|
||||
importedObject = JSON.parse(exportedString);
|
||||
} catch (e) {
|
||||
// Error will be sent later, since empty string could be parsed as nothing without raising the error.
|
||||
}
|
||||
|
||||
if (!importedObject) {
|
||||
throw new Error('Invalid JSON!');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user