소스 검색

Simplify.

Herby Vojčík 5 년 전
부모
커밋
c6155d4141
1개의 변경된 파일4개의 추가작업 그리고 6개의 파일을 삭제
  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 */