DLynch has uploaded a new change for review.

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

Change subject: TitledElement: Behave like its docs say it should
......................................................................

TitledElement: Behave like its docs say it should

Change-Id: Ie5ca7a6fb983167e766248cb35cdccd5548d1c0e
---
M src/mixins/TitledElement.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/59/253059/1

diff --git a/src/mixins/TitledElement.js b/src/mixins/TitledElement.js
index 3752066..f122129 100644
--- a/src/mixins/TitledElement.js
+++ b/src/mixins/TitledElement.js
@@ -80,7 +80,8 @@
  * @chainable
  */
 OO.ui.mixin.TitledElement.prototype.setTitle = function ( title ) {
-       title = typeof title === 'string' ? OO.ui.resolveMsg( title ) : null;
+       title = typeof title === 'function' ? OO.ui.resolveMsg( title ) : title;
+       title = ( typeof title === 'string' && title.length ) ? title : null;
 
        if ( this.title !== title ) {
                if ( this.$titled ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5ca7a6fb983167e766248cb35cdccd5548d1c0e
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: DLynch <[email protected]>

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

Reply via email to