diff --git a/packages/csv-parse/dist/cjs/index.cjs b/packages/csv-parse/dist/cjs/index.cjs index 153224a47..d960b5f09 100644 --- a/packages/csv-parse/dist/cjs/index.cjs +++ b/packages/csv-parse/dist/cjs/index.cjs @@ -851,14 +851,13 @@ const transform = function(original_options = {}) { if(lappend === true && rappend === true){ this.state.field.append(chr); }else if(rtrim === true && !this.__isCharTrimable(chr)){ - const err = this.__error( + return this.__error( new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [ 'Invalid Closing Quote:', 'found non trimable byte after quote', `at line ${this.info.lines}`, ], this.options, this.__infoField()) ); - if(err !== undefined) return err; } } if(end === true){ diff --git a/packages/csv-parse/dist/cjs/sync.cjs b/packages/csv-parse/dist/cjs/sync.cjs index b447065fa..9759e2cd7 100644 --- a/packages/csv-parse/dist/cjs/sync.cjs +++ b/packages/csv-parse/dist/cjs/sync.cjs @@ -849,14 +849,13 @@ const transform = function(original_options = {}) { if(lappend === true && rappend === true){ this.state.field.append(chr); }else if(rtrim === true && !this.__isCharTrimable(chr)){ - const err = this.__error( + return this.__error( new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [ 'Invalid Closing Quote:', 'found non trimable byte after quote', `at line ${this.info.lines}`, ], this.options, this.__infoField()) ); - if(err !== undefined) return err; } } if(end === true){ diff --git a/packages/csv-parse/dist/esm/index.js b/packages/csv-parse/dist/esm/index.js index 68a069bc7..ba7fb242d 100644 --- a/packages/csv-parse/dist/esm/index.js +++ b/packages/csv-parse/dist/esm/index.js @@ -5907,14 +5907,13 @@ const transform = function(original_options = {}) { if(lappend === true && rappend === true){ this.state.field.append(chr); }else if(rtrim === true && !this.__isCharTrimable(chr)){ - const err = this.__error( + return this.__error( new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [ 'Invalid Closing Quote:', 'found non trimable byte after quote', `at line ${this.info.lines}`, ], this.options, this.__infoField()) ); - if(err !== undefined) return err; } } if(end === true){ diff --git a/packages/csv-parse/dist/esm/sync.js b/packages/csv-parse/dist/esm/sync.js index 3bfb6fc0c..0483eb852 100644 --- a/packages/csv-parse/dist/esm/sync.js +++ b/packages/csv-parse/dist/esm/sync.js @@ -2817,14 +2817,13 @@ const transform = function(original_options = {}) { if(lappend === true && rappend === true){ this.state.field.append(chr); }else if(rtrim === true && !this.__isCharTrimable(chr)){ - const err = this.__error( + return this.__error( new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [ 'Invalid Closing Quote:', 'found non trimable byte after quote', `at line ${this.info.lines}`, ], this.options, this.__infoField()) ); - if(err !== undefined) return err; } } if(end === true){ diff --git a/packages/csv-parse/dist/iife/index.js b/packages/csv-parse/dist/iife/index.js index 515a08360..61832c474 100644 --- a/packages/csv-parse/dist/iife/index.js +++ b/packages/csv-parse/dist/iife/index.js @@ -5910,14 +5910,13 @@ var csv_parse = (function (exports) { if(lappend === true && rappend === true){ this.state.field.append(chr); }else if(rtrim === true && !this.__isCharTrimable(chr)){ - const err = this.__error( + return this.__error( new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [ 'Invalid Closing Quote:', 'found non trimable byte after quote', `at line ${this.info.lines}`, ], this.options, this.__infoField()) ); - if(err !== undefined) return err; } } if(end === true){ diff --git a/packages/csv-parse/dist/iife/sync.js b/packages/csv-parse/dist/iife/sync.js index fd01cb54b..4dc6c0aa4 100644 --- a/packages/csv-parse/dist/iife/sync.js +++ b/packages/csv-parse/dist/iife/sync.js @@ -2820,14 +2820,13 @@ var csv_parse_sync = (function (exports) { if(lappend === true && rappend === true){ this.state.field.append(chr); }else if(rtrim === true && !this.__isCharTrimable(chr)){ - const err = this.__error( + return this.__error( new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [ 'Invalid Closing Quote:', 'found non trimable byte after quote', `at line ${this.info.lines}`, ], this.options, this.__infoField()) ); - if(err !== undefined) return err; } } if(end === true){ diff --git a/packages/csv-parse/dist/umd/index.js b/packages/csv-parse/dist/umd/index.js index 92453a276..b94cc7a31 100644 --- a/packages/csv-parse/dist/umd/index.js +++ b/packages/csv-parse/dist/umd/index.js @@ -5913,14 +5913,13 @@ if(lappend === true && rappend === true){ this.state.field.append(chr); }else if(rtrim === true && !this.__isCharTrimable(chr)){ - const err = this.__error( + return this.__error( new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [ 'Invalid Closing Quote:', 'found non trimable byte after quote', `at line ${this.info.lines}`, ], this.options, this.__infoField()) ); - if(err !== undefined) return err; } } if(end === true){ diff --git a/packages/csv-parse/dist/umd/sync.js b/packages/csv-parse/dist/umd/sync.js index 949730209..a855938ff 100644 --- a/packages/csv-parse/dist/umd/sync.js +++ b/packages/csv-parse/dist/umd/sync.js @@ -2823,14 +2823,13 @@ if(lappend === true && rappend === true){ this.state.field.append(chr); }else if(rtrim === true && !this.__isCharTrimable(chr)){ - const err = this.__error( + return this.__error( new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [ 'Invalid Closing Quote:', 'found non trimable byte after quote', `at line ${this.info.lines}`, ], this.options, this.__infoField()) ); - if(err !== undefined) return err; } } if(end === true){ diff --git a/packages/csv-parse/lib/api/index.js b/packages/csv-parse/lib/api/index.js index 17eb2da82..505cd0964 100644 --- a/packages/csv-parse/lib/api/index.js +++ b/packages/csv-parse/lib/api/index.js @@ -288,14 +288,13 @@ const transform = function(original_options = {}) { if(lappend === true && rappend === true){ this.state.field.append(chr); }else if(rtrim === true && !this.__isCharTrimable(chr)){ - const err = this.__error( + return this.__error( new CsvError('CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE', [ 'Invalid Closing Quote:', 'found non trimable byte after quote', `at line ${this.info.lines}`, ], this.options, this.__infoField()) ); - if(err !== undefined) return err; } } if(end === true){