Fix decompressFromBase64

This commit is contained in:
ckcz123 2021-09-01 22:52:17 +08:00
parent f810fa2382
commit 6b2ff250be
2 changed files with 4 additions and 2 deletions

View File

@ -2173,7 +2173,8 @@ control.prototype._syncLoad_http = function (id, password) {
var msg = null; var msg = null;
try { try {
msg = JSON.parse(LZString.decompressFromBase64(response.msg)); msg = JSON.parse(LZString.decompressFromBase64(response.msg));
} catch (e) { } catch (e) {}
if (!msg) {
try { try {
msg = JSON.parse(response.msg); msg = JSON.parse(response.msg);
} catch (e) {} } catch (e) {}

View File

@ -1030,7 +1030,8 @@ utils.prototype.readFileContent = function (content) {
// 检查base64 // 检查base64
try { try {
obj = JSON.parse(LZString.decompressFromBase64(content)); obj = JSON.parse(LZString.decompressFromBase64(content));
} catch (e) { } catch (e) {}
if (!obj) {
try { try {
obj = JSON.parse(content); obj = JSON.parse(content);
} catch (e) { } catch (e) {