1
0
Просмотр исходного кода

kernel: small speculative performance tweak

Herbert Vojčík 7 лет назад
Родитель
Сommit
ca8788cdfd
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      support/kernel-runtime.js

+ 3 - 3
support/kernel-runtime.js

@@ -378,11 +378,11 @@ define(function () {
             var propertyValue = self[propertyName];
             if (typeof propertyValue === "function" && !/^[A-Z]/.test(propertyName)) {
                 return propertyValue.apply(self, args || []);
-            } else if (args.length > 0) {
+            } else if (args.length === 0) {
+                return propertyValue;
+            } else {
                 self[propertyName] = args[0];
                 return self;
-            } else {
-                return propertyValue;
             }
         };
     }