Browse Source

pastojs: fixed create pascal class descendent from a pascal class descendent of a JS function

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

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

@@ -353,6 +353,7 @@ var rtl = {
     if (isFunc){
       // create pascal class descendent from JS function
       c = Object.create(ancestor.prototype);
+      c.$ancestorfunc = ancestor;
     } else if (ancestor.$func){
       // create pascal class descendent from a pascal class descendent of a JS function
       isFunc = true;
@@ -397,7 +398,6 @@ var rtl = {
       function f(){}
       f.prototype = c;
       c.$func = f;
-      c.$ancestorfunc = ancestor;
     }
   },