jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Catrope: Looks good to me, approved
Jforrester: Looks good to me, but someone else must approve
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: Ie5ca7a6fb983167e766248cb35cdccd5548d1c0e
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: DLynch <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits