From 51e3a6b3a3dc86db304635a3c0ecdc02791f2151 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Fri, 2 Jun 2017 09:54:48 +0100 Subject: [PATCH] Don't use String.startsWith, use slice instead. - String.startsWith is not supported in IE --- .../ide/editor/directives/aceEditor/labels/LabelsManager.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/labels/LabelsManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/labels/LabelsManager.coffee index 631e23bc82..0e504b4ff8 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/labels/LabelsManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/labels/LabelsManager.coffee @@ -26,7 +26,7 @@ define [ if ( change.action in ['remove', 'insert'] and ((_.any(change.lines, (line) -> line.match(/\\label\{[^\}\n\\]{0,80}\}/))) or - (commandFragment?.length > 2 and commandFragment.startsWith('\\label{'))) + (commandFragment?.length > 2 and commandFragment.slice(0,7) == '\\label{')) ) @scheduleLoadLabelsFromOpenDoc()