mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Fix return value of ve.ui.LinkInspector.getSelectedLinkAnnotations()
Was returning a single annotation, but all callers were expecting an object. Change-Id: I55be083e5451f4ace5e54dfecb904ae53041054b
This commit is contained in:
parent
9d9c06f4e2
commit
9c939047be
|
@ -54,13 +54,10 @@ ve.ui.LinkInspector.prototype.getSelectedLinkAnnotations = function(){
|
|||
|
||||
if ( data.length ) {
|
||||
if ( ve.isPlainObject( data[0][1] ) ) {
|
||||
var annotations = ve.dm.Document.getMatchingAnnotations( data[0][1], /link\/.*/ );
|
||||
for ( var hash in annotations ) {
|
||||
return annotations[hash];
|
||||
}
|
||||
return ve.dm.Document.getMatchingAnnotations( data[0][1], /link\/.*/ );
|
||||
}
|
||||
}
|
||||
return ;
|
||||
return {};
|
||||
};
|
||||
|
||||
ve.ui.LinkInspector.prototype.getTitleFromSelection = function() {
|
||||
|
|
Loading…
Reference in a new issue