@nkhang1902/strapi-plugin-export-import-clsx 1.3.8 → 1.3.9

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.8",
3
+ "version": "1.3.9",
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": {
@@ -303,6 +303,11 @@ module.exports = ({ strapi }) => ({
303
303
  for (const [key, attr] of Object.entries(schema.attributes)) {
304
304
  const value = data[key];
305
305
  if (value === undefined) continue;
306
+
307
+ if ((!value || value === "") && attr.required) {
308
+ cleaned[key] = undefined;
309
+ }
310
+
306
311
  if (attr.type === 'component') {
307
312
  if (!value) {
308
313
  cleaned[key] = attr.repeatable ? [] : null;