Skip to content

Commit cdc8c09

Browse files
committed
fix test - single empty string entry
1 parent 369357a commit cdc8c09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/arrayParser.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ ArrayParser.prototype.nextChar = function() {
3131
ArrayParser.prototype.record = function(char) {
3232
return this.recorded.push(char);
3333
};
34-
ArrayParser.prototype.newEntry = function() {
34+
ArrayParser.prototype.newEntry = function(includeEmpty) {
3535
var entry;
36-
if (this.recorded.length > 0) {
36+
if (this.recorded.length > 0 || includeEmpty) {
3737
entry = this.recorded.join("");
3838
if (entry === "NULL") {
3939
entry = null;
@@ -70,7 +70,7 @@ ArrayParser.prototype.parse = function(nested) {
7070
}
7171
} else if (c.char === '"' && !c.escaped) {
7272
if (quote) {
73-
this.newEntry();
73+
this.newEntry(true);
7474
}
7575
quote = !quote;
7676
} else if (c.char === ',' && !quote) {

0 commit comments

Comments
 (0)