diff --git a/AppKit/CPWebView.j b/AppKit/CPWebView.j index 38ddfb5fa..cd4876675 100644 --- a/AppKit/CPWebView.j +++ b/AppKit/CPWebView.j @@ -187,7 +187,7 @@ CPWebViewScrollNative = 2; var win = null; try { win = [self DOMWindow]; } catch (e) {} - if (win && win.document) + if (win && win.document && win.document.body) { var width = win.document.body.scrollWidth, height = win.document.body.scrollHeight; diff --git a/Tests/Manual/LoadTimeTest/AppController.j b/Tests/Manual/LoadTimeTest/AppController.j index bd1f94618..1638643a2 100644 --- a/Tests/Manual/LoadTimeTest/AppController.j +++ b/Tests/Manual/LoadTimeTest/AppController.j @@ -28,7 +28,7 @@ if (data.length < 10) { // reload with data in the query string - window.location.href = [window.location.protocol, "//", window.location.host, window.location.port, window.location.pathname, "?", encodeURIComponent(JSON.stringify(data))].join(""); + window.location.href = [window.location.protocol, "//", window.location.host, window.location.pathname, "?", encodeURIComponent(JSON.stringify(data))].join(""); } else {