revert: umm...

This commit is contained in:
Ansolve 2024-01-04 18:09:53 +08:00
parent e3c47c91f8
commit 19431cf8ee
No known key found for this signature in database
GPG Key ID: 2F2873AC9538CC2D
1 changed files with 3 additions and 0 deletions

View File

@ -1229,6 +1229,7 @@ export class Get extends Uninstantable {
/**
* @template T
* @param {T} obj
* @param {WeakMap<T, T>} [map] - 拷贝用的临时存储请勿自行赋值
* @returns {T}
*/
static copy(obj, map = new WeakMap()) {
@ -1236,6 +1237,8 @@ export class Get extends Uninstantable {
return structuredClone(obj);
}
catch {
// 暂时有BUG先返回原始数据再说
return obj;
// obj不可序列化时参考[这里](https://juejin.cn/post/7315612852890026021)实现深拷贝
const getType = (obj) => Object.prototype.toString.call(obj);