Skip to content

Commit 348cb42

Browse files
committed
Fix failing unit tests.
1 parent 130907c commit 348cb42

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ export class OverlayRef implements PortalHost {
3838
}
3939

4040
dispose(): void {
41-
this._state.positionStrategy.dispose();
41+
if (this._state.positionStrategy) {
42+
this._state.positionStrategy.dispose();
43+
}
44+
4245
this._detachBackdrop();
4346
this._portalHost.dispose();
4447
}

src/lib/core/overlay/overlay.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,5 +251,6 @@ class FakePositionStrategy implements PositionStrategy {
251251
return Promise.resolve();
252252
}
253253

254+
dispose() {}
254255
}
255256

0 commit comments

Comments
 (0)