TG-3344 Comment is edited if you cancel add link dialog

When dialog is canceled, the result will be null because there is no start of link "<<<" inserted. In this case we shouldn't search for the end of the link and just return.
stable
Vlad Topala 2015-10-26 19:59:28 +02:00
parent 2a4b3ab81a
commit bec7472c19
1 changed files with 2 additions and 0 deletions

View File

@ -149,6 +149,8 @@ MarkitupDirective = ($rootscope, $rs, $selectedText, $template, $compile, $trans
startIndex = result.index
break
return if !result
regex = />>>/gi
endIndex = 0
loop