File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -142,17 +142,15 @@ export class MdTooltip implements OnDestroy {
142
142
/** The default delay in ms before hiding the tooltip after hide is called */
143
143
@Input ( 'mdTooltipHideDelay' ) hideDelay = 0 ;
144
144
145
- private _message : string ;
145
+ private _message = '' ;
146
146
147
147
/** The message to be displayed in the tooltip */
148
148
@Input ( 'mdTooltip' ) get message ( ) { return this . _message ; }
149
149
set message ( value : string ) {
150
- if ( this . _message ) {
151
- this . _ariaDescriber . removeDescription ( this . _elementRef . nativeElement , this . _message ) ;
152
- }
150
+ this . _ariaDescriber . removeDescription ( this . _elementRef . nativeElement , this . _message ) ;
153
151
154
152
// If the message is not a string (e.g. number), convert it to a string and trim it.
155
- this . _message = value ? ` ${ value } ` . trim ( ) : '' ;
153
+ this . _message = value ? value . trim ( ) : '' ;
156
154
this . _updateTooltipMessage ( ) ;
157
155
this . _ariaDescriber . describe ( this . _elementRef . nativeElement , this . message ) ;
158
156
}
You can’t perform that action at this time.
0 commit comments