File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -70,15 +70,15 @@ export default class Footer extends React.PureComponent<FooterProps, FooterState
70
70
}
71
71
72
72
private getMountedWebview ( ) {
73
- const e = this . props . element ;
74
- if ( e === null ) {
73
+ // webview tag must be mounted into the Dom, even if the webview component is not null!
74
+ // check if at least one webview is mounted:
75
+ if ( document . getElementsByTagName ( "webview" ) . length >= 1 ) {
76
+ // returns the mounted webview component or null:
77
+ return this . props . element ;
78
+ } else {
79
+ // if the webview is not mounted, then return null
75
80
return null ;
76
81
}
77
- if ( e . getWebContents ( ) === null ) {
78
- // Note: When <webview> is not mounted in DOM, it returns null.
79
- return null ;
80
- }
81
- return e ;
82
82
}
83
83
84
84
private goBack ( e : React . MouseEvent < HTMLDivElement > ) {
You can’t perform that action at this time.
0 commit comments