ソースを参照

kernel: Directly export updateMethod.

Herbert Vojčík 7 年 前
コミット
3826db99f6
1 ファイル変更2 行追加4 行削除
  1. 2 4
      support/kernel-fundamentals.js

+ 2 - 4
support/kernel-fundamentals.js

@@ -246,7 +246,7 @@ define(['./compatibility' /* TODO remove */], function () {
             traitOrBehavior.methods = Object.create(null);
         };
 
-        function updateMethod (selector, traitOrBehavior) {
+        this.updateMethod = function (selector, traitOrBehavior) {
             var oldMethod = traitOrBehavior.methods[selector],
                 newMethod = traitOrBehavior.localMethods[selector];
             if (oldMethod == null && newMethod == null) {
@@ -262,9 +262,7 @@ define(['./compatibility' /* TODO remove */], function () {
                 traitOrBehavior.methodRemoved(oldMethod);
             }
             if (st._methodReplaced) st._methodReplaced(newMethod, oldMethod, traitOrBehavior);
-        }
-
-        this.updateMethod = updateMethod;
+        };
     }
 
     function ArraySetBrik (brikz, st) {