Skip to content

Commit 0748c1d

Browse files
committed
[APS] Fix regression from zotero#733
cc @Dominik-K (`ZU.xpath` always returns an array)
1 parent f6d71e4 commit 0748c1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

APS.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"inRepository": true,
1010
"translatorType": 4,
1111
"browserSupport": "gcsibv",
12-
"lastUpdated": "2014-05-08 21:40:24"
12+
"lastUpdated": "2014-05-08 21:55:24"
1313
}
1414

1515
function getSearchResults(doc) {
@@ -75,7 +75,7 @@ function scrape(doc, url) {
7575
));
7676

7777
// attach PDF
78-
if(ZU.xpath(doc, '//section[@id="title"]//a[starts-with(text(), "PDF")]')) {
78+
if(ZU.xpath(doc, '//section[@id="title"]//a[starts-with(text(), "PDF")]').length) {
7979
item.attachments.push({
8080
title: 'Full Text PDF',
8181
url: url.replace('{REPLACE}', 'pdf'),

0 commit comments

Comments
 (0)