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

Change subject: Fix silly mistakes in refactors
......................................................................


Fix silly mistakes in refactors

Change-Id: I96a05066248527503da6c6519054710d0a4ab623
---
M resources/src/FileAnnotation.js
M resources/src/FileAnnotationEditor.js
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/src/FileAnnotation.js b/resources/src/FileAnnotation.js
index 790495f..1d823c2 100644
--- a/resources/src/FileAnnotation.js
+++ b/resources/src/FileAnnotation.js
@@ -45,7 +45,7 @@
 
                this.editing = config.editing;
 
-               if ( this.text && this.parsed ) {
+               if ( this.text !== undefined && this.parsed !== undefined ) {
                        this.$annotation = $( '<div>' )
                                .addClass( 'file-annotation' )
                                .append( this.parsed );
diff --git a/resources/src/FileAnnotationEditor.js 
b/resources/src/FileAnnotationEditor.js
index 4a161dd..d4308ce 100644
--- a/resources/src/FileAnnotationEditor.js
+++ b/resources/src/FileAnnotationEditor.js
@@ -33,7 +33,9 @@
                        // For a new annotation, the box is the container.
                        $contain = $box;
 
-                       config.$container.append( $box );
+                       if ( config.$container ) {
+                               config.$container.append( $box );
+                       }
                }
 
                this.$box = $box;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I96a05066248527503da6c6519054710d0a4ab623
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FileAnnotations
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <mholmqu...@wikimedia.org>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to