no message

This commit is contained in:
kuaifan 2025-04-17 09:45:48 +08:00
parent 18b7e17e95
commit 8f2f68dffc
2 changed files with 11 additions and 5 deletions

2
docker/search/zincsearch/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

View File

@ -343,15 +343,19 @@ const timezone = require("dayjs/plugin/timezone");
/** /**
* 克隆对象 * 克隆对象
* @param myObj * @param value
* @param useParse
* @returns {*} * @returns {*}
*/ */
cloneJSON(myObj) { cloneJSON(value, useParse = false) {
if (useParse === true) {
return $A.jsonParse($A.jsonStringify(value))
}
try { try {
return structuredClone(myObj); return structuredClone(value);
} catch (e) { } catch (e) {
if (typeof myObj !== 'object' || myObj === null) return myObj; if (typeof value !== 'object' || value === null) return value;
return $A.jsonParse($A.jsonStringify(myObj)) return $A.jsonParse($A.jsonStringify(value))
} }
}, },