Check for instance of generic LinkAnnotation when querying target.

Resolves (Bug 44686)

Change-Id: I0ff962330e061aea66a25a923f46d6759e5ff6af
This commit is contained in:
Rob Moen 2013-02-05 11:55:27 -08:00
parent c4ee328edf
commit 78a99fb0a3

View file

@ -81,5 +81,8 @@ ve.ui.LinkTargetInputWidget.prototype.getAnnotation = function () {
* @returns {string} Target
*/
ve.ui.LinkTargetInputWidget.prototype.getTargetFromAnnotation = function ( annotation ) {
return annotation.data.href;
if ( annotation instanceof ve.dm.LinkAnnotation ) {
return annotation.data.href;
}
return '';
};