Mholloway has uploaded a new change for review. ( 
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(-)


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

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: newchange
Gerrit-Change-Id: I8bca3a8ea96560381b6d1ec562c4fcf555693608
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