@nkhang1902/strapi-plugin-export-import-clsx 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nkhang1902/strapi-plugin-export-import-clsx",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "A powerful Strapi plugin for exporting and importing data with Excel support and advanced filtering",
5
5
  "main": "./strapi-server.js",
6
6
  "scripts": {
@@ -187,7 +187,7 @@ module.exports = ({ strapi }) => ({
187
187
  }
188
188
 
189
189
  // Excel explicitly empty → unlink
190
- if (value === "") {
190
+ if (value === "" || value === null) {
191
191
  if (relation === "manyToMany" || relation === "oneToMany") {
192
192
  updatedEntry[field] = [];
193
193
  } else {
@@ -302,6 +302,11 @@ module.exports = ({ strapi }) => ({
302
302
 
303
303
  if (value === undefined) continue;
304
304
 
305
+ if (value === null && attr.required) {
306
+ cleaned[key] = attr.default;
307
+ continue;
308
+ };
309
+
305
310
  if (attr.type === 'component') {
306
311
  if (!value) {
307
312
  cleaned[key] = attr.repeatable ? [] : null;
@@ -315,7 +320,7 @@ module.exports = ({ strapi }) => ({
315
320
  : this.sanitizeComponent(value, attr.component);
316
321
  continue;
317
322
  }
318
-
323
+
319
324
  cleaned[key] = this.sanitizePrimitive(value, attr);
320
325
  }
321
326