fix JSONstringifyWithCycles

This commit is contained in:
James Allen 2016-10-31 16:57:29 +00:00
parent c2eb49845f
commit 11c24377cb

View file

@ -237,7 +237,7 @@ define [
seen = []
return JSON.stringify o, (k,v) ->
if (typeof v == 'object')
if ( !seen.indexOf(v) )
if ( seen.indexOf(v) >= 0 )
return '__cycle__'
seen.push(v);
return v