mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 08:42:43 +08:00
This reverts commit c77a63dd99.
This commit is contained in:
@@ -850,6 +850,10 @@ function deserialize (data, details, options) {
|
||||
const customEnv = options.customEnv;
|
||||
const ignoreEditorOnly = options.ignoreEditorOnly;
|
||||
|
||||
if (CC_EDITOR && Buffer.isBuffer(data)) {
|
||||
data = data.toString();
|
||||
}
|
||||
|
||||
if (typeof data === 'string') {
|
||||
data = JSON.parse(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user