Fix JS error in MessagePoster when (optional) options param not given
authorRoan Kattouw <roan.kattouw@gmail.com>
Mon, 15 Jul 2019 21:03:09 +0000 (14:03 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Mon, 15 Jul 2019 21:03:09 +0000 (14:03 -0700)
Change-Id: I77c53862431402d18ff995b410bba9eca9c3beff
Follows-Up: I80c401c56e231b34822791faffebc84d4933b922

resources/src/mediawiki.messagePoster.wikitext/WikitextMessagePoster.js

index fd65e8a..e87f8a7 100644 (file)
@@ -28,6 +28,7 @@
         */
        WikitextMessagePoster.prototype.post = function ( subject, body, options ) {
                var additionalParams;
+               options = options || {};
                mw.messagePoster.WikitextMessagePoster.parent.prototype.post.call( this, subject, body, options );
 
                // Add signature if needed