From 3df6637e4b92e52ec7acb8dbc65a0fb3559b47e9 Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 27 Jun 2020 07:18:24 +0000 Subject: [PATCH] rtl: fixed jsInstanceOf returning boolean --- packages/rtl/js.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rtl/js.pas b/packages/rtl/js.pas index be4ba6a..9c5bc48 100644 --- a/packages/rtl/js.pas +++ b/packages/rtl/js.pas @@ -901,7 +901,7 @@ function isUndefined(const v: JSValue): boolean; assembler; function isDefined(const v: JSValue): boolean; assembler; function isUTF16Char(const v: JSValue): boolean; assembler; function isExt(const InstanceOrClass, aClass: JSValue): boolean; external name 'rtl.isExt'; // aClass can be a JS object or function -function jsInstanceOf(const aFunction, aFunctionWithPrototype: JSValue): String; assembler; +function jsInstanceOf(const aFunction, aFunctionWithPrototype: JSValue): Boolean; assembler; function jsTypeOf(const v: JSValue): String; external name 'typeof'; function jsIsNaN(const v: JSValue): boolean; external name 'isNaN';// true if value cannot be converted to a number. e.g. True on NaN, undefined, {}, '123'. False on true, null, '', ' ', '1A' function jsIsFinite(const v: JSValue): boolean; external name 'isFinite';// true if value is a Finite number @@ -1043,7 +1043,7 @@ asm end; function jsInstanceOf(const aFunction, aFunctionWithPrototype: JSValue - ): String; assembler; + ): Boolean; assembler; asm return aFunction instanceof aFunctionWithPrototype; end;