mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
fix decompression of json (#4852)
This commit is contained in:
committed by
Weiliang Wang
parent
110ff5fd2e
commit
0cdd004eb1
@@ -48,9 +48,12 @@ export function decompressJson (data, keys) {
|
||||
}
|
||||
else if (typeof data === 'object') {
|
||||
for (var key in data) {
|
||||
data[keys[key]] = data[key];
|
||||
decompressJson(data[key], keys);
|
||||
delete data[key];
|
||||
var newKey = keys[key];
|
||||
if (newKey) {
|
||||
data[newKey] = data[key];
|
||||
delete data[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user