From de8ebaefb136ce596c3d3b1ab3d71ade75bb349d Mon Sep 17 00:00:00 2001
From: moonkop <moonkop@qq.com>
Date: Mon, 12 Apr 2021 16:26:46 +0800
Subject: [PATCH] shadow should not be top block

---
 src/engine/blocks.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/engine/blocks.js b/src/engine/blocks.js
index aca5da91b..f9b33504c 100644
--- a/src/engine/blocks.js
+++ b/src/engine/blocks.js
@@ -728,7 +728,9 @@ class Blocks {
 
         // Is this block a top-level block?
         if (typeof e.newParent === 'undefined') {
-            this._addScript(e.id);
+            if (!this._blocks[e.id].shadow) {
+                this._addScript(e.id);
+            }
         } else {
             // Remove script, if one exists.
             this._deleteScript(e.id);