mirror of
https://github.com/koloml/furbooru-tagging-assistant.git
synced 2025-12-24 07:12:57 +00:00
Fixed error triggered when empty string is parsed as null
This commit is contained in:
@@ -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