mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Fix selection check in wikitext warning
Change-Id: I2f084eb4ee29bd166b05163cd2d6e64e0a4f136d
This commit is contained in:
parent
358268be7a
commit
ab365ccacc
|
@ -770,9 +770,11 @@ ve.init.mw.ViewPageTarget.static.checkForWikitextWarning = function ( surface, w
|
|||
var text, node, doc = surface.getView().getDocument(),
|
||||
selection = surface.getModel().getSelection(),
|
||||
textMatches;
|
||||
if ( !selection ) {
|
||||
|
||||
if ( !( selection instanceof ve.dm.LinearSelection ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
node = doc.getBranchNodeFromOffset( selection.getRange().start );
|
||||
if ( !( node instanceof ve.ce.ContentBranchNode ) ) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue