Ver código fonte

Merge pull request #4931 from sebavan/master

Try Fix Inspector Forum Issue
sebavan 7 anos atrás
pai
commit
0dff2cda6a
1 arquivos alterados com 4 adições e 2 exclusões
  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);
+            }
         }
     }