@nkhang1902/strapi-plugin-export-import-clsx 1.2.1 → 1.2.2

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.2.1",
3
+ "version": "1.2.2",
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": {
@@ -80,15 +80,12 @@ module.exports = ({ strapi }) => ({
80
80
 
81
81
  const mapSheetNameToContentType = (sheetName) => {
82
82
  // If targetContentType is provided, use it instead of guessing from sheet name
83
- if (targetContentType) {
84
- return targetContentType;
85
- }
86
83
  return "api::" + sheetName + "." + sheetName;
87
84
  };
88
85
 
89
86
  workbook.SheetNames.forEach((sheetName) => {
90
87
  if (targetContentType && mapSheetNameToContentType(sheetName) !== targetContentType) {
91
- throw new Error(`Sheet name "${sheetName}" does not match target content type "${targetContentType.split(".")[1]}"`);
88
+ throw new Error(`Sheet name "${sheetName}" does not match the target content type "${targetContentType.split(".")[1]}"`);
92
89
  }
93
90
  const worksheet = workbook.Sheets[sheetName];
94
91
  const rows = XLSX.utils.sheet_to_json(worksheet);