瀏覽代碼

fix JSONstringifyWithCycles

James Allen 10 年之前
父節點
當前提交
11c24377cb
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
  1. 1 1
      services/web/public/coffee/ide/editor/directives/aceEditor/undo/UndoManager.coffee

+ 1 - 1
services/web/public/coffee/ide/editor/directives/aceEditor/undo/UndoManager.coffee

@@ -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