From 0257f4824b065c8fcb8a454a24a33def970ac09b Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 12 Sep 2017 22:06:08 +0200 Subject: [PATCH] chore(tooltip): regression when trimming non-string messages (#7024) Fixes a regression from f6d1078e5440531a57fd8e187ccb6720b725a6f6. --- src/lib/tooltip/tooltip.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/tooltip/tooltip.ts b/src/lib/tooltip/tooltip.ts index a941be0a341..3fa8f937ace 100644 --- a/src/lib/tooltip/tooltip.ts +++ b/src/lib/tooltip/tooltip.ts @@ -150,7 +150,7 @@ export class MdTooltip implements OnDestroy { this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message); // If the message is not a string (e.g. number), convert it to a string and trim it. - this._message = value ? value.trim() : ''; + this._message = value != null ? `${value}`.trim() : ''; this._updateTooltipMessage(); this._ariaDescriber.describe(this._elementRef.nativeElement, this.message); }