From 4c23a3c8f088ea363e340fa9ddb69f772ab6bf12 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Mon, 5 Feb 2018 11:49:25 +0000 Subject: [PATCH] Fix bug where spell check cache would error when toggling between ace & cm --- .../web/public/coffee/ide/editor/directives/aceEditor.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor.coffee index 989bd75127..716fd2ee9d 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor.coffee @@ -97,7 +97,7 @@ define [ scope.name = attrs.aceEditor if scope.spellCheck # only enable spellcheck when explicitly required - spellCheckCache = $cacheFactory("spellCheck-#{scope.name}", {capacity: 1000}) + spellCheckCache = $cacheFactory.get("spellCheck-#{scope.name}") || $cacheFactory("spellCheck-#{scope.name}", {capacity: 1000}) spellCheckManager = new SpellCheckManager(scope, editor, element, spellCheckCache, $http, $q) undoManager = new UndoManager(scope, editor, element) highlightsManager = new HighlightsManager(scope, editor, element) @@ -106,7 +106,6 @@ define [ metadataManager = new MetadataManager(scope, editor, element, metadata) autoCompleteManager = new AutoCompleteManager(scope, editor, element, metadataManager, graphics, preamble, files) - # Prevert Ctrl|Cmd-S from triggering save dialog editor.commands.addCommand name: "save",