mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
MWWikitextDataTransferHandlerFactory: Don't reimplement getText
I forgot about getText in 41ca528705
, apparently.
Bug: T163237
Change-Id: Ibb646fc03a0293845c4449cbbe6c822ba63751f8
This commit is contained in:
parent
862c3ca22e
commit
2f40972807
|
@ -62,7 +62,7 @@ ve.ui.MWWikitextDataTransferHandlerFactory.prototype.create = function () {
|
|||
// document.
|
||||
annotations = doc.data.getAnnotationsFromRange( new ve.Range( 0, doc.data.getLength() ) );
|
||||
if ( annotations.getLength() === 1 ) {
|
||||
text = doc.getData().reduce( function ( acc, val ) { return ( Array.isArray( acc ) ? acc[ 0 ] : acc ) + val[ 0 ]; } );
|
||||
text = doc.data.getText();
|
||||
if ( annotations.get( 0 ).getAttribute( 'href' ) === text ) {
|
||||
return resolve( text );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue