From d51e8ebc2930e32086b84076e5ffe5d46802f991 Mon Sep 17 00:00:00 2001 From: chrfalch Date: Fri, 17 Feb 2023 19:00:17 +0100 Subject: [PATCH] fix: hostobjects are not proxied Previously host objects where returned as proxied objects when unwrapping. This is not what we want and this has now been fixed. --- cpp/wrappers/WKTJsiObjectWrapper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/wrappers/WKTJsiObjectWrapper.h b/cpp/wrappers/WKTJsiObjectWrapper.h index d1e68c6..123fc3f 100644 --- a/cpp/wrappers/WKTJsiObjectWrapper.h +++ b/cpp/wrappers/WKTJsiObjectWrapper.h @@ -161,7 +161,7 @@ class JsiObjectWrapper : public JsiHostObject, if (getType() == JsiWrapperType::Object) { return getObjectAsProxy(runtime, shared_from_this()); } else if (getType() == JsiWrapperType::HostObject) { - return getObjectAsProxy(runtime, _hostObject); + return jsi::Object::createFromHostObject(runtime, _hostObject); } return JsiWrapper::getAsProxyOrValue(runtime); }