Skip to content

Commit 4624e11

Browse files
committed
stretchedChecked should cause this to stop running or you'll possibly end up with an infinite loop.
1 parent 6dd9f25 commit 4624e11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Popup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Popup extends Component {
8383
const height = $ele.offsetHeight;
8484
const width = $ele.offsetWidth;
8585

86-
if (targetHeight !== height || targetWidth !== width || !stretchChecked) {
86+
if ((targetHeight !== height || targetWidth !== width) && !stretchChecked) {
8787
this.setState({
8888
stretchChecked: true,
8989
targetHeight: height,

0 commit comments

Comments
 (0)