Pārlūkot izejas kodu

Merge pull request #4931 from sebavan/master

Try Fix Inspector Forum Issue
sebavan 7 gadi atpakaļ
vecāks
revīzija
0dff2cda6a
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  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);
+            }
         }
     }