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++
|
&& initial.length++
|
||||||
continue }
|
continue }
|
||||||
if(str.slice(i, i+EMPTY.length) == EMPTY){
|
if(str.slice(i, i+EMPTY.length) == EMPTY){
|
||||||
|
index++
|
||||||
i += EMPTY.length
|
i += EMPTY.length
|
||||||
|
if(str[i] == ','){
|
||||||
|
i++ }
|
||||||
// XXX this feels hackish -- can this be deligated to the handler???
|
// XXX this feels hackish -- can this be deligated to the handler???
|
||||||
initial instanceof Array
|
initial instanceof Array
|
||||||
&& initial.length++
|
&& initial.length++
|
||||||
|
|||||||
2
test.js
2
test.js
@ -37,7 +37,7 @@ var setups = test.Setups({
|
|||||||
return '[]' },
|
return '[]' },
|
||||||
// XXX BUG: trailing <empty> gets duplicated...
|
// XXX BUG: trailing <empty> gets duplicated...
|
||||||
'array-sparse': function(assert){
|
'array-sparse': function(assert){
|
||||||
return '[1,<empty>,<empty>,2,<empty>]' },
|
return '[<empty>,1,<empty>,<empty>,2,<empty>]' },
|
||||||
|
|
||||||
'object-empty': function(assert){
|
'object-empty': function(assert){
|
||||||
return '{}' },
|
return '{}' },
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user