From 9c939047be58970e0c903ba3aca6db09df896326 Mon Sep 17 00:00:00 2001 From: Catrope Date: Wed, 13 Jun 2012 18:49:38 -0700 Subject: [PATCH] Fix return value of ve.ui.LinkInspector.getSelectedLinkAnnotations() Was returning a single annotation, but all callers were expecting an object. Change-Id: I55be083e5451f4ace5e54dfecb904ae53041054b --- modules/ve2/ui/inspectors/ve.ui.LinkInspector.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/ve2/ui/inspectors/ve.ui.LinkInspector.js b/modules/ve2/ui/inspectors/ve.ui.LinkInspector.js index de0360be3e..1f634092dc 100644 --- a/modules/ve2/ui/inspectors/ve.ui.LinkInspector.js +++ b/modules/ve2/ui/inspectors/ve.ui.LinkInspector.js @@ -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() {