Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/184588

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(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/88/184588/1

diff --git a/modules/draft/ext.cx.draft.js b/modules/draft/ext.cx.draft.js
index 3d9039d..50ff95d 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: newchange
Gerrit-Change-Id: If4f23cbce9f58a9ae42cbe1417d0cd6d7b7de8dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>

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

Reply via email to