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:
Catrope 2012-06-13 18:49:38 -07:00
parent 9d9c06f4e2
commit 9c939047be

View file

@ -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() {