Browse Source

pastojs: fixed o as intftype, when o is nil

git-svn-id: trunk@48188 -
(cherry picked from commit 25fd38b2da861f635599fce9e7c4d7bedcac6401)
Mattias Gaertner 4 years ago
parent
commit
8c961ad2ea
1 changed files with 3 additions and 4 deletions
  1. 3 4
      utils/pas2js/dist/rtl.js

+ 3 - 4
utils/pas2js/dist/rtl.js

@@ -707,10 +707,9 @@ var rtl = {
   },
 
   intfAsIntfT: function (intf,intftype){
-    if (intf){
-      var i = rtl.getIntfG(intf.$o,intftype.$guid);
-      if (i!==null) return i;
-    }
+    if (!intf) return null;
+    var i = rtl.getIntfG(intf.$o,intftype.$guid);
+    if (i) return i;
     rtl.raiseEInvalidCast();
   },