changes
This commit is contained in:
@@ -91,22 +91,6 @@ export default defineNuxtPlugin(() => {
|
||||
return structuredClone(toRawDeep(val));
|
||||
};
|
||||
|
||||
const clone = function (obj) {
|
||||
if (obj === null || typeof obj !== "object" || "isActiveClone" in obj) return obj;
|
||||
let temp;
|
||||
if (obj instanceof Date)
|
||||
temp = new obj.constructor(); //or new Date(obj);
|
||||
else temp = obj.constructor();
|
||||
for (let key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
obj["isActiveClone"] = null;
|
||||
temp[key] = clone(obj[key]);
|
||||
delete obj["isActiveClone"];
|
||||
}
|
||||
}
|
||||
return temp;
|
||||
};
|
||||
|
||||
const remove = function (arr, idx) {
|
||||
arr.splice(idx, 1);
|
||||
};
|
||||
@@ -459,7 +443,6 @@ export default defineNuxtPlugin(() => {
|
||||
empty,
|
||||
toRawDeep,
|
||||
copy,
|
||||
clone,
|
||||
remove,
|
||||
stripHtml,
|
||||
isNumber,
|
||||
|
||||
Reference in New Issue
Block a user