Krinkle has uploaded a new change for review.

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


Change subject: ve.ui.TextInputWidget: Fix TypeError when config is undefined
......................................................................

ve.ui.TextInputWidget: Fix TypeError when config is undefined

Parameter config is optional (both in the parent class and here),
this subclass forgot to add the fallback.

Though in a plain subclass the local fallback isn't needed
(parent class takes cares of it), in this case it is needed
since the constructor directly accesses config.multiline etc.

Change-Id: I3f9b73efb6c40a29efa221e1654b1247baaca281
---
M modules/ve/ui/widgets/ve.ui.InputWidget.js
M modules/ve/ui/widgets/ve.ui.TextInputWidget.js
2 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/57/71157/1

diff --git a/modules/ve/ui/widgets/ve.ui.InputWidget.js 
b/modules/ve/ui/widgets/ve.ui.InputWidget.js
index 977b65d..a5e76df 100644
--- a/modules/ve/ui/widgets/ve.ui.InputWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.InputWidget.js
@@ -88,6 +88,7 @@
 ve.ui.InputWidget.prototype.getValue = function () {
        return this.value;
 };
+
 /**
  * Sets the direction of the current input, either RTL or LTR
  *
diff --git a/modules/ve/ui/widgets/ve.ui.TextInputWidget.js 
b/modules/ve/ui/widgets/ve.ui.TextInputWidget.js
index eb21d49..9a5e990 100644
--- a/modules/ve/ui/widgets/ve.ui.TextInputWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.TextInputWidget.js
@@ -18,6 +18,8 @@
  * @cfg {boolean} [multiline=false] Allow multiple lines of text
  */
 ve.ui.TextInputWidget = function VeUiTextInputWidget( config ) {
+       config = config || {};
+
        // Parent constructor
        ve.ui.InputWidget.call( this, config );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f9b73efb6c40a29efa221e1654b1247baaca281
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>

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

Reply via email to