Skip to content

Commit

Permalink
Fix throw error when using a portal inside a view (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkrick authored Feb 13, 2021
1 parent db07eb2 commit 904d738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-swipeable-views/src/SwipeableViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function adaptMouse(event) {
export function getDomTreeShapes(element, rootNode) {
let domTreeShapes = [];

while (element && element !== rootNode) {
while (element && element !== rootNode && element !== document.body) {
// We reach a Swipeable View, no need to look higher in the dom tree.
if (element.hasAttribute('data-swipeable')) {
break;
Expand Down

0 comments on commit 904d738

Please sign in to comment.