File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ export default class extends Component {
14
14
this . handleSource ( props . source , props . newWindow ) ;
15
15
}
16
16
17
+ setRef = ref => this . frameRef = ref ;
18
+
17
19
handleSource = ( source , newWindow ) => {
18
20
if ( ! source . method ) return ;
19
21
@@ -90,7 +92,7 @@ export default class extends Component {
90
92
91
93
postMessage = ( message , origin ) => {
92
94
this . frameRef . contentWindow . postMessage ( message , origin ) ;
93
- }
95
+ } ;
94
96
95
97
handleInjectedJavaScript = html => {
96
98
if ( this . props . injectedJavaScript ) {
@@ -117,7 +119,7 @@ export default class extends Component {
117
119
const styleObj = StyleSheet . flatten ( this . props . style ) ;
118
120
return createElement ( 'iframe' , {
119
121
title,
120
- ref : frameRef => { this . frameRef = frameRef ; } ,
122
+ ref : this . setRef ,
121
123
src : ! source . method ? source . uri : undefined ,
122
124
srcDoc : this . handleInjectedJavaScript ( this . state . html || source . html ) ,
123
125
width : styleObj && styleObj . width ,
You can’t perform that action at this time.
0 commit comments