From 591f0d89744d4f7b97784139c86fa1ef85a70606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=9D=B1=E6=BE=94?= Date: Sat, 4 Jun 2022 11:03:30 +0800 Subject: [PATCH] fix: global.__reanimatedWorkletInit is not a function fix #159, fix #182 --- src/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index b1d75816..765b60ad 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,3 +1,7 @@ +if (!('__reanimatedWorkletInit' in global)) { + Object.assign(global, { __reanimatedWorkletInit: () => {} }); +} + export type { TCarouselProps, ICarouselInstance } from './types'; import Carousel from './Carousel';