mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Merge "Fix method hasSlugAtOffset to return true when length of the element is 0"
This commit is contained in:
commit
319ff040bb
|
@ -197,6 +197,9 @@ ve.ce.BranchNode.prototype.onSplice = function( index, howmany ) {
|
|||
};
|
||||
|
||||
ve.ce.BranchNode.prototype.hasSlugAtOffset = function( offset ) {
|
||||
if ( this.getLength() === 0 ) {
|
||||
return true;
|
||||
}
|
||||
for ( var i = 0; i < this.children.length; i++ ) {
|
||||
if ( this.children[i].canHaveSlug() ) {
|
||||
var nodeOffset = this.children[i].model.getRoot().getOffsetFromNode( this.children[i].model );
|
||||
|
|
Loading…
Reference in a new issue