Browse Source

Simplify.

Herby Vojčík 4 years ago
parent
commit
c6155d4141
1 changed files with 4 additions and 6 deletions
  1. 4 6
      lang/base/junk-drawer.js

+ 4 - 6
lang/base/junk-drawer.js

@@ -20,13 +20,11 @@ define(function () {
         });
     }
 
+    function noop () {
+    }
+
     function declareJsMethod (obj, name) {
-        if (obj[name] != null) return;
-        Object.defineProperty(obj, name, {
-            value: function () {
-            },
-            enumerable: false, configurable: true, writable: true
-        });
+        if (obj[name] == null) installMethodOfJsObject(obj, name, noop);
     }
 
     /* Convert a Smalltalk selector into a JS selector */