Skip to content

Commit 46620a5

Browse files
committed
Optional chaining to avoid indexing iframe before load.
1 parent 96ec88c commit 46620a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Retool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Retool extends React.Component {
9595
}
9696

9797
handle = (event) => {
98-
if (!this.iframe.contentWindow) return
98+
if (!this.iframe?.contentWindow) return
9999
if (event.data.type === "PARENT_WINDOW_QUERY") {
100100
this.createOrReplaceWatcher(
101101
event.data.selector,

0 commit comments

Comments
 (0)