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

- String.startsWith is not supported in IE
This commit is contained in:
Shane Kilkelly 2017-06-02 09:54:48 +01:00
parent 9a15420c4e
commit 51e3a6b3a3

View file

@ -26,7 +26,7 @@ define [
if ( if (
change.action in ['remove', 'insert'] and change.action in ['remove', 'insert'] and
((_.any(change.lines, (line) -> line.match(/\\label\{[^\}\n\\]{0,80}\}/))) or ((_.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() @scheduleLoadLabelsFromOpenDoc()