Skip to content

Commit aed6819

Browse files
committed
Fix react-native polyfill to prevent multiple polyfills
1 parent 7e2da3e commit aed6819

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/large-plums-create.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@plextv/react-native-lightning": patch
3+
---
4+
5+
Fix react-native polyfill to prevent multiple polyfills

packages/react-native-lightning/src/plugins/reactNativePolyfillsPlugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ function tryFindFocusManager(
4141
return null;
4242
}
4343

44+
let polyfilled = false;
45+
4446
export const reactNativePolyfillsPlugin = (): Plugin => {
4547
// Track the single FocusManager instance
4648
let focusManager: FocusManager<LightningViewElement> | null = null;
47-
let polyfilled = false;
4849

4950
return {
5051
async init() {

0 commit comments

Comments
 (0)