Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/397921 )

Change subject: Fix definition endpoint 500s
......................................................................

Fix definition endpoint 500s

querySelectorAll returns a NodeList and not an Array.  NodeLists don't
have a forEach method. We have to use Array.prototype.call.

Bug: T182715
Change-Id: I84e39215b8135ff88441448bb57cba5c5efaa5ac
---
M lib/parseDefinitionsUsingSectionTags.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/21/397921/1

diff --git a/lib/parseDefinitionsUsingSectionTags.js 
b/lib/parseDefinitionsUsingSectionTags.js
index 87bf7f0..1cafda8 100644
--- a/lib/parseDefinitionsUsingSectionTags.js
+++ b/lib/parseDefinitionsUsingSectionTags.js
@@ -85,7 +85,7 @@
         currentDefinition.definition = html.substring(0, 
html.indexOf('<dl')).trim();
         currentDefinition.examples = [];
         const examples = element.querySelectorAll(selector);
-        examples.forEach((example) => {
+        [].forEach.call(examples, (example) => {
             currentDefinition.examples.push(example.innerHTML.trim());
         });
     } else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84e39215b8135ff88441448bb57cba5c5efaa5ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to