mirror of
https://github.com/flynx/serialize.js.git
synced 2026-07-10 11:10:57 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
a37ba58afb
commit
a03f493893
@ -328,7 +328,10 @@ module.eJSON = {
|
||||
&& initial.length++
|
||||
continue }
|
||||
if(str.slice(i, i+EMPTY.length) == EMPTY){
|
||||
index++
|
||||
i += EMPTY.length
|
||||
if(str[i] == ','){
|
||||
i++ }
|
||||
// XXX this feels hackish -- can this be deligated to the handler???
|
||||
initial instanceof Array
|
||||
&& initial.length++
|
||||
|
||||
2
test.js
2
test.js
@ -37,7 +37,7 @@ var setups = test.Setups({
|
||||
return '[]' },
|
||||
// XXX BUG: trailing <empty> gets duplicated...
|
||||
'array-sparse': function(assert){
|
||||
return '[1,<empty>,<empty>,2,<empty>]' },
|
||||
return '[<empty>,1,<empty>,<empty>,2,<empty>]' },
|
||||
|
||||
'object-empty': function(assert){
|
||||
return '{}' },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user