changes
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user