puvox-library 1.0.44 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library_standard.js +4 -4
- package/package.json +1 -1
package/library_standard.js
CHANGED
@@ -2904,13 +2904,13 @@ const puvox_library =
|
|
2904
2904
|
return val;
|
2905
2905
|
}
|
2906
2906
|
} else {
|
2907
|
-
alert(`storageType ${storageType} not supported`);
|
2907
|
+
if (typeof alert !== 'undefined') alert(`storageType ${storageType} not supported`);
|
2908
2908
|
throw new Error(`storageType ${storageType} not supported`);
|
2909
2909
|
}
|
2910
2910
|
},
|
2911
2911
|
helper_write(groupName, content, storageType){
|
2912
2912
|
const appName = puvox_library.getAppName();
|
2913
|
-
if (storageType
|
2913
|
+
if (storageType === 'file'){
|
2914
2914
|
const filepath = puvox_library.file.tempDir() + appName + '_' + groupName + '.json';
|
2915
2915
|
// todo: add expiration
|
2916
2916
|
puvox_library.file.write(filepath, content);
|
@@ -2924,13 +2924,13 @@ const puvox_library =
|
|
2924
2924
|
}
|
2925
2925
|
catch(ex){ alert("Cache storage quote exceeded. can't save value. err598 |" + ex.message); }
|
2926
2926
|
} else {
|
2927
|
-
alert(`storageType ${storageType} not supported`);
|
2927
|
+
if (typeof alert !== 'undefined') alert(`storageType ${storageType} not supported`);
|
2928
2928
|
throw new Error(`storageType ${storageType} not supported`);
|
2929
2929
|
}
|
2930
2930
|
},
|
2931
2931
|
helper_delete(groupName, storageType){
|
2932
2932
|
const appName = puvox_library.getAppName();
|
2933
|
-
if (storageType
|
2933
|
+
if (storageType === 'file'){
|
2934
2934
|
const filepath = puvox_library.file.tempDir() + appName + '_' + groupName + '.json';
|
2935
2935
|
// todo: better delete
|
2936
2936
|
puvox_library.file.delete(filepath);
|