@lingk/sync 1.1.55 → 1.1.56

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.
@@ -4627,8 +4627,8 @@ module.exports =
4627
4627
  return '[' + firstLine + ']';
4628
4628
  };
4629
4629
 
4630
- _this.parseCSV = function (file, csv) {
4631
- if (!csv || csv === null) {
4630
+ _this.parseCSV = function (file, csv, isXLS) {
4631
+ if (isXLS && (!csv || csv === null)) {
4632
4632
  var err = 'Remove empty sheets- ' + file.name;
4633
4633
  alert(err);
4634
4634
  throw new Error(err);
@@ -4689,7 +4689,7 @@ module.exports =
4689
4689
  });
4690
4690
  sheetNames.forEach(function (sn) {
4691
4691
  csv = _xlsx2.default.utils.sheet_to_csv(workbook.Sheets[sn]);
4692
- _this.parseCSV(file, csv).then(function (xlsMeta) {
4692
+ _this.parseCSV(file, csv, isXLS).then(function (xlsMeta) {
4693
4693
  meta = meta.concat(Object.assign({}, xlsMeta, {
4694
4694
  sheetName: sn,
4695
4695
  fileType: extension
@@ -4703,7 +4703,7 @@ module.exports =
4703
4703
  });
4704
4704
  });
4705
4705
  } else if (extension === 'csv') {
4706
- _this.parseCSV(file, csv).then(function (csvMeta) {
4706
+ _this.parseCSV(file, csv, null).then(function (csvMeta) {
4707
4707
  meta = meta.concat(Object.assign({}, csvMeta, { fileType: extension }));
4708
4708
  counter += 1;
4709
4709
  if (counter === fs.length) {