From 87cc08569a850520ee38992b90073f4fd3921d65 Mon Sep 17 00:00:00 2001 From: James Allen Date: Mon, 16 Apr 2018 17:03:18 +0100 Subject: [PATCH] Fix bad if statement sending doc open into infinite loop --- .../ide/history/controllers/HistoryV2DiffController.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/history/controllers/HistoryV2DiffController.coffee b/services/web/public/coffee/ide/history/controllers/HistoryV2DiffController.coffee index 89cf3975ec..c2ced4cf59 100644 --- a/services/web/public/coffee/ide/history/controllers/HistoryV2DiffController.coffee +++ b/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)