This commit is contained in:
Viet An
2026-06-04 11:36:43 +07:00
parent 8e2dd06def
commit 2981d9790a
13 changed files with 375 additions and 944 deletions

View File

@@ -178,14 +178,15 @@ export default defineNuxtPlugin((nuxtApp) => {
};
const resetNull = function (obj) {
for (const [key, value] of Object.entries(obj)) {
if (typeof value === "string") {
let val = value.trim();
if (val === "" || val === "") val = null;
obj[key] = val;
}
}
return obj;
return Object.fromEntries(
Object.entries(obj).map(([key, value]) => {
if (typeof value === "string") {
const val = value.trim();
return [key, val === "" ? null : val];
}
return [key, value];
}),
);
};
const copyToClipboard = function (text) {