Fix bundled attr() when attribute doesn't exist
Regression from 4efc0af119
This commit is contained in:
parent
bb44841a80
commit
d3c481fcf6
1 changed files with 2 additions and 1 deletions
|
@ -1871,7 +1871,8 @@ Zotero.Translate.Base.prototype = {
|
|||
var elem = index
|
||||
? docOrElem.querySelectorAll(selector).item(index)
|
||||
: docOrElem.querySelector(selector);
|
||||
return (elem ? elem.getAttribute(attr) : "").trim();
|
||||
if (!elem) return "";
|
||||
return (elem.hasAttribute(attr) ? elem.getAttribute(attr) : "").trim();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue