diff --git a/src/LiveDevelopment/MultiBrowserImpl/documents/LiveHTMLDocument.js b/src/LiveDevelopment/MultiBrowserImpl/documents/LiveHTMLDocument.js index 4ff3a1fadc..9686ad405c 100644 --- a/src/LiveDevelopment/MultiBrowserImpl/documents/LiveHTMLDocument.js +++ b/src/LiveDevelopment/MultiBrowserImpl/documents/LiveHTMLDocument.js @@ -127,8 +127,21 @@ define(function (require, exports, module) { body = HTMLInstrumentation.generateInstrumentedHTML(this.editor, this.protocol.getRemoteScript()); } + if (!body) { + // generateInstrumentedHTML() returns null when the document is empty or its + // HTML cannot be parsed into a DOM (no instrumentable content). In that case it + // also never injected the remote