Skip to content

Commit 55e5686

Browse files
devversionkara
authored andcommitted
update(overlay): use boolean-property coercion function (#2487)
1 parent 0be5acd commit 55e5686

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/core/overlay/overlay-directives.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {ConnectedPositionStrategy} from './position/connected-position-strategy'
2424
import {Subscription} from 'rxjs/Subscription';
2525
import {Dir, LayoutDirection} from '../rtl/dir';
2626
import {Scrollable} from './scroll/scrollable';
27+
import {coerceBooleanProperty} from '../coercion/boolean-property';
2728

2829
/** Default set of positions for the overlay. Follows the behavior of a dropdown. */
2930
let defaultPositionList = [
@@ -121,9 +122,8 @@ export class ConnectedOverlayDirective implements OnDestroy {
121122
return this._hasBackdrop;
122123
}
123124

124-
// TODO: move the boolean coercion logic to a shared function in core
125125
set hasBackdrop(value: any) {
126-
this._hasBackdrop = value != null && `${value}` !== 'false';
126+
this._hasBackdrop = coerceBooleanProperty(value);
127127
}
128128

129129
@Input()

0 commit comments

Comments
 (0)