jenkins-bot has submitted this change and it was merged. ( 
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(-)

Approvals:
  BearND: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I84e39215b8135ff88441448bb57cba5c5efaa5ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Fjalapeno <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Mhurd <[email protected]>
Gerrit-Reviewer: Ppchelko <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to