-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix regression in reanimated module wrapper (#2383)
- Loading branch information
1 parent
8d54359
commit 2391306
Showing
2 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
import type * as ReanimatedT from "react-native-reanimated"; | ||
|
||
import { createModuleProxy } from "../ModuleProxy"; | ||
import { | ||
OptionalDependencyNotInstalledError, | ||
createModuleProxy, | ||
} from "../ModuleProxy"; | ||
type TReanimated = typeof ReanimatedT; | ||
|
||
const Reanimated = createModuleProxy<TReanimated>( | ||
"react-native-reanimated", | ||
() => { | ||
const Reanimated = createModuleProxy<TReanimated>(() => { | ||
try { | ||
return require("react-native-reanimated"); | ||
} catch (e) { | ||
throw new OptionalDependencyNotInstalledError("react-native-reanimated"); | ||
} | ||
); | ||
}); | ||
|
||
// eslint-disable-next-line import/no-default-export | ||
export default Reanimated; |