Просмотр исходного кода

Don't use String.startsWith, use slice instead.

- String.startsWith is not supported in IE
Shane Kilkelly 9 лет назад
Родитель
Сommit
51e3a6b3a3

+ 1 - 1
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()