Skip to content

Commit

Permalink
Move 4b007e5 webview fix to 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Feb 8, 2017
1 parent 60ae81a commit a4fe835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/workbench/parts/html/browser/webview-pre.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ document.addEventListener("DOMContentLoaded", function (event) {
// workaround for https://github.com/Microsoft/vscode/issues/12865
// check new scrollTop and reset if neccessary
setTimeout(function () {
if (scrollTop !== newFrame.contentDocument.body.scrollTop) {
if (newFrame.contentDocument && newFrame.contentDocument.body && scrollTop !== newFrame.contentDocument.body.scrollTop) {
newFrame.contentDocument.body.scrollTop = scrollTop;
}
document.body.removeChild(frame);
Expand Down

0 comments on commit a4fe835

Please sign in to comment.