소스 검색

Fix bad if statement sending doc open into infinite loop

James Allen 8 년 전
부모
커밋
87cc08569a
1개의 변경된 파일과 2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      services/web/public/coffee/ide/history/controllers/HistoryV2DiffController.coffee

+ 2 - 1
services/web/public/coffee/ide/history/controllers/HistoryV2DiffController.coffee

@@ -29,10 +29,11 @@ define [
 			do tryOpen = () ->
 				if iterations > 5
 					return
+				iterations += 1
 				entity = ide.fileTreeManager.findEntityById(id)
 				if entity? and type == 'doc'
 					ide.editorManager.openDoc(entity)
-				if entity? and type == 'file'
+				else if entity? and type == 'file'
 					ide.binaryFilesManager.openFile(entity)
 				else
 					setTimeout(tryOpen, 500)