瀏覽代碼

Try Fix Inspector Forum Issue

sebastien 7 年之前
父節點
當前提交
e98324b9b8
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      inspector/src/helpers/Helpers.ts

+ 4 - 2
inspector/src/helpers/Helpers.ts

@@ -141,8 +141,10 @@ export class Helpers {
      * Removes all children of the given div.
      */
     public static CleanDiv(div: HTMLElement) {
-        while (div.firstChild) {
-            div.removeChild(div.firstChild);
+        if (div) {
+            while (div.firstChild) {
+                div.removeChild(div.firstChild);
+            }
         }
     }