fix: Fix RN 0.73 compatibility (#2260)

This commit is contained in:
Marc Rousavy 2023-12-07 20:09:15 +03:00 committed by GitHub
parent a77939f6c4
commit 2ce3b4a0ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,8 @@ class VisionCameraProxy(context: ReactApplicationContext) {
init { init {
val jsCallInvokerHolder = context.catalystInstance.jsCallInvokerHolder as CallInvokerHolderImpl val jsCallInvokerHolder = context.catalystInstance.jsCallInvokerHolder as CallInvokerHolderImpl
val jsRuntimeHolder = context.javaScriptContextHolder.get() val jsRuntimeHolder =
context.javaScriptContextHolder?.get() ?: throw Error("JSI Runtime is null! VisionCamera does not yet support bridgeless mode..")
mScheduler = VisionCameraScheduler() mScheduler = VisionCameraScheduler()
mContext = WeakReference(context) mContext = WeakReference(context)
mHybridData = initHybrid(jsRuntimeHolder, jsCallInvokerHolder, mScheduler) mHybridData = initHybrid(jsRuntimeHolder, jsCallInvokerHolder, mScheduler)