Przeglądaj źródła

pastojs: fixed classmethod pointer

git-svn-id: trunk@49333 -
Mattias Gaertner 4 lat temu
rodzic
commit
aa03991088
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      utils/pas2js/dist/rtl.js

+ 2 - 2
utils/pas2js/dist/rtl.js

@@ -229,7 +229,7 @@ var rtl = {
   createCallback: function(scope, fn){
     var cb;
     if (typeof(fn)==='string'){
-      if (!scope.$events) scope.$events = {};
+      if (!scope.hasOwnProperty('$events')) scope.$events = {};
       cb = scope.$events[fn];
       if (cb) return cb;
       scope.$events[fn] = cb = function(){
@@ -248,7 +248,7 @@ var rtl = {
   createSafeCallback: function(scope, fn){
     var cb;
     if (typeof(fn)==='string'){
-      if (!scope.$events) scope.$events = {};
+      if (!scope.hasOwnProperty('$events')) scope.$events = {};
       cb = scope.$events[fn];
       if (cb) return cb;
       scope.$events[fn] = cb = function(){