Skip to content

Commit 0257f48

Browse files
crisbetommalerba
authored andcommitted
chore(tooltip): regression when trimming non-string messages (angular#7024)
Fixes a regression from f6d1078.
1 parent acbb1d4 commit 0257f48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/tooltip/tooltip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export class MdTooltip implements OnDestroy {
150150
this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message);
151151

152152
// If the message is not a string (e.g. number), convert it to a string and trim it.
153-
this._message = value ? value.trim() : '';
153+
this._message = value != null ? `${value}`.trim() : '';
154154
this._updateTooltipMessage();
155155
this._ariaDescriber.describe(this._elementRef.nativeElement, this.message);
156156
}

0 commit comments

Comments
 (0)