diff --git a/src/Writer.php b/src/Writer.php
index <HASH>..<HASH> 100644
--- a/src/Writer.php
+++ b/src/Writer.php
@@ -88,8 +88,7 @@ class Writer implements WriterContract
         $frames = $this->getFrames($inspector);
 
         $editorFrame = array_shift($frames);
-
-        if ($this->showEditor) {
+        if ($this->showEditor && $editorFrame !== null) {
             $this->renderEditor($editorFrame);
         }
Fixes issue when there is no editor range