jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/397815 )
Change subject: Fix summary responses for pages with empty intros
......................................................................
Fix summary responses for pages with empty intros
We recently introduced a bug wherein extract and extract_html properties
were being omitted from the summary response in cases where the lead intro
for the page was empty. This will restore those properties.
Bug: T182639
Change-Id: I8bca3a8ea96560381b6d1ec562c4fcf555693608
---
M lib/mobile-util.js
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Mobrovac: Looks good to me, but someone else must approve
BearND: Looks good to me, approved
jenkins-bot: Verified
Phuedx: Looks good to me, but someone else must approve
diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 0876e3c..443dc01 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -216,7 +216,7 @@
const leadText = domino.createDocument(page.sections[0].text);
const intro = transforms.extractLeadIntroduction(leadText);
- const summary = intro.length ? transforms.summarize(intro) : intro;
+ const summary = intro.length ? transforms.summarize(intro) : { extract:
'', extract_html: '' };
return Object.assign({
code: 200,
--
To view, visit https://gerrit.wikimedia.org/r/397815
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8bca3a8ea96560381b6d1ec562c4fcf555693608
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: Mobrovac <[email protected]>
Gerrit-Reviewer: Phuedx <[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