File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
src/packages/frontend/jupyter/output-messages/mime-types Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,19 @@ const IframeHtml = ({ value }) => {
21
21
// TODO: Might wnat to switch to https://www.npmjs.com/package/iframe-resizer-react
22
22
// instead of the hack of timeouts below...
23
23
useEffect ( ( ) => {
24
- if ( iframeRef . current == null ) return ;
24
+ if ( iframeRef . current == null ) {
25
+ return ;
26
+ }
25
27
const f = ( ) => {
26
28
if ( iframeRef . current != null && isMountedRef . current ) {
27
- iframeRef . current . height = `${
28
- iframeRef . current . contentWindow . document . documentElement
29
- ?. offsetHeight ?? 600
30
- } px`;
29
+ try {
30
+ iframeRef . current . height = `${
31
+ iframeRef . current . contentWindow . document . documentElement
32
+ ?. offsetHeight ?? 600
33
+ } px`;
34
+ } catch ( _err ) {
35
+ // this fails on the share server for security reasons, which is good.
36
+ }
31
37
}
32
38
} ;
33
39
f ( ) ;
You can’t perform that action at this time.
0 commit comments