Showing 1 changed files with 3 additions and 8 deletions
+3 -8
Nasal/core.nas
... ...
@@ -219,17 +219,12 @@ var deviceClass = {
219 219
         foreach (var member; keys(me)) {
220 220
             if (member == 'parents')
221 221
                 continue;
222
-            if (contains(me[member], 'parents')) {
222
+            if (contains(me[member], 'parents'))
223 223
                 if (contains(me[member].parents[0], 'new')
224
-                and typeof(me[member].parents[0].new) == 'func') {
225
-                    if (contains(me[member].parents[0], 'removeAllChildren')
226
-                    and !contains(me[member].parents[0], 'setVisible')) # this one is a props node, but not canvas
227
-                        me[member].removeAllChildren();
228
-                    elsif (contains(me[member].parents[0], 'off')
224
+                and typeof(me[member].parents[0].new) == 'func')
225
+                    if (contains(me[member].parents[0], 'off')
229 226
                     and typeof(me[member].parents[0].off) == 'func')
230 227
                         me[member].off();
231
-                }
232
-            }
233 228
         }
234 229
         foreach (var member; keys(me)) {
235 230
             if (member == 'parents')