Skip to content

Commit

Permalink
fix(Overlay): side effects of overlay on SSR, close #2269
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna committed Apr 25, 2021
1 parent 09f4bb5 commit 63c445b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/overlay/utils/position.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ function _getViewportSize(container) {
}

const getContainer = ({ container, baseElement }) => {
// SSR下会有副作用
if (typeof document === undefined) {
return container;
}

let calcContainer = findNode(container, baseElement);

if (!calcContainer) {
Expand Down

0 comments on commit 63c445b

Please sign in to comment.