Skip to content

Commit bcea14b

Browse files
committed
test(igxOverlay): fix failing test, #2486
1 parent 161357c commit bcea14b

File tree

1 file changed

+5
-3
lines changed
  • projects/igniteui-angular/src/lib/services/overlay

1 file changed

+5
-3
lines changed

projects/igniteui-angular/src/lib/services/overlay/utilities.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ export function getPointFromPositionsSettings(settings: PositionSettings, overla
6262
// if for some reason overlayWrapper is not at 0,0 position, e.g. overlay is in outlet
6363
// which is in element with transform,perspective or filter set, we should translate the result
6464
// accordingly
65-
const overlayWrapperPosition = overlayWrapper.getBoundingClientRect();
66-
result.x -= overlayWrapperPosition.left;
67-
result.y -= overlayWrapperPosition.top;
65+
if (overlayWrapper) {
66+
const overlayWrapperPosition = overlayWrapper.getBoundingClientRect();
67+
result.x -= overlayWrapperPosition.left;
68+
result.y -= overlayWrapperPosition.top;
69+
}
6870

6971
return result;
7072
}

0 commit comments

Comments
 (0)