Browse Source

pas2js: rtl: set TObject.$ancestor

git-svn-id: trunk@42504 -
Mattias Gaertner 6 years ago
parent
commit
4e22f7a2ec
1 changed files with 2 additions and 2 deletions
  1. 2 2
      utils/pas2js/dist/rtl.js

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

@@ -280,7 +280,7 @@ var rtl = {
       // if root is an "object" then c.$ancestor === Object.getPrototypeOf(c)
       // if root is a "function" then c.$ancestor === c.__proto__, Object.getPrototypeOf(c) returns the root
     } else {
-      c = {};
+      c = { $ancestor: null };
       c.$create = function(fn,args){
         if (args == undefined) args = [];
         var o = Object.create(this);
@@ -355,7 +355,7 @@ var rtl = {
       c.$ancestor = ancestor;
       // c.$ancestor === Object.getPrototypeOf(c)
     } else {
-      c = {};
+      c = { $ancestor: null };
     };
     parent[name] = c;
     c.$class = c; // Note: o.$class === Object.getPrototypeOf(o)