jenkins-bot has submitted this change and it was merged.

Change subject: Guard against a js error in drafts module
......................................................................


Guard against a js error in drafts module

This was causing js error when there was no drafts for current
translation pair.

Change-Id: If4f23cbce9f58a9ae42cbe1417d0cd6d7b7de8dd
---
M modules/draft/ext.cx.draft.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/draft/ext.cx.draft.js b/modules/draft/ext.cx.draft.js
index 641da36..f2c54d3 100644
--- a/modules/draft/ext.cx.draft.js
+++ b/modules/draft/ext.cx.draft.js
@@ -86,7 +86,7 @@
                } ).done( function ( response ) {
                        var translation;
 
-                       translation = 
response.query.contenttranslation.translation;
+                       translation = response.query && 
response.query.contenttranslation.translation;
                        // If this translation is draft and not by current 
user, there is an
                        // existing translation.
                        if ( translation &&

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4f23cbce9f58a9ae42cbe1417d0cd6d7b7de8dd
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Jsahleen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to