jenkins-bot has submitted this change and it was merged. Change subject: Fix TypeError: this.message.properties is undefined ......................................................................
Fix TypeError: this.message.properties is undefined Bug: 47001 Change-Id: I28fcfd85d9d59a5ba8469fb6603ee572dc16c00b --- M resources/js/ext.translate.editor.js 1 file changed, 5 insertions(+), 3 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.translate.editor.js b/resources/js/ext.translate.editor.js index 95268d8..d03b329 100644 --- a/resources/js/ext.translate.editor.js +++ b/resources/js/ext.translate.editor.js @@ -56,7 +56,7 @@ this.expanded = false; this.$editTrigger.append( this.$editor ); - if ( this.message.properties.status === 'fuzzy' ) { + if ( this.message.properties && this.message.properties.status === 'fuzzy' ) { this.addWarning( mw.message( 'tux-editor-outdated-warning' ).escaped(), 'diff' @@ -125,8 +125,10 @@ this.$messageItem.addClass( 'translated' ); this.dirty = false; - $( '.tux-action-bar .tux-statsbar' ).trigger( 'change', [ 'translated', this.message.properties.state ] ); - // TODO: Update any other statsbar for the same group in the page. + if ( this.message.properties ) { + $( '.tux-action-bar .tux-statsbar' ).trigger( 'change', [ 'translated', this.message.properties.state ] ); + // TODO: Update any other statsbar for the same group in the page. + } }, /** -- To view, visit https://gerrit.wikimedia.org/r/58058 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28fcfd85d9d59a5ba8469fb6603ee572dc16c00b Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> Gerrit-Reviewer: Amire80 <amir.ahar...@mail.huji.ac.il> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits