Mvolz has submitted this change and it was merged.

Change subject: Bug fix: remove extra Array in scrapeHelper
......................................................................


Bug fix: remove extra Array in scrapeHelper

Remove wrapping of citation in Array by
scrapeHelper; citation object is already a
1d Array.

Bug: T78145
Change-Id: I5058224ca4076a07ed19e10b08cb10e4197e432e
---
M lib/requests.js
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Mvolz: Verified; Looks good to me, approved



diff --git a/lib/requests.js b/lib/requests.js
index 459b739..b51eb8a 100644
--- a/lib/requests.js
+++ b/lib/requests.js
@@ -85,13 +85,13 @@
 var scrapeHelper = function(url, opts, callback) {
        if (opts.format == 'bibtex') {
                scrape(url, function(error, citation) {
-                       zoteroExportRequest(citation[0], opts, function(error2, 
response, body) {
-                               callback(error2, body);
+                       zoteroExportRequest(citation[0], opts, function(err, 
response, body) {
+                               callback(err, body);
                        });
                });
        } else {
                scrape(url, function(error, citation) {
-                       callback(error, [citation]);
+                       callback(error, citation);
                });
        }
 };

-- 
To view, visit https://gerrit.wikimedia.org/r/179432
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5058224ca4076a07ed19e10b08cb10e4197e432e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/citoid
Gerrit-Branch: master
Gerrit-Owner: Mvolz <mv...@wikimedia.org>
Gerrit-Reviewer: Mvolz <mv...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to