// Can't, sorry.
},
apiCheckValid: function () {
- var ok = this.getValue() !== null || suppressErrors;
- this.setIcon( ok ? null : 'alert' );
+ var ok = this.getValue() !== null && this.getValue() !== undefined || suppressErrors;
+ this.info.setIcon( ok ? null : 'alert' );
this.setTitle( ok ? '' : mw.message( 'apisandbox-alert-field' ).plain() );
return $.Deferred().resolve( ok ).promise();
}
};
/**
- * Interface to ApiSandbox UI
- *
- * @class mw.special.ApiSandbox
- */
+ * Interface to ApiSandbox UI
+ *
+ * @class mw.special.ApiSandbox
+ */
ApiSandbox = {
/**
* Initialize the UI