Skip to content

Commit

Permalink
Bump package version to 10.25.2 and improve linking event listener re…
Browse files Browse the repository at this point in the history
…moval
  • Loading branch information
sunnylqm committed Feb 26, 2025
1 parent 23d1fcd commit a432e5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "10.25.1",
"version": "10.25.2",
"description": "react-native hot update",
"main": "src/index",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ export const UpdateProvider = ({
};
const linkingListener = Linking.addEventListener('url', linkingHandler);
return () => {
if (typeof linkingListener.remove === 'function') {
linkingListener.remove();
} else if ('removeEventListener' in Linking) {
if ('removeEventListener' in Linking) {
(Linking as any).removeEventListener('url', linkingHandler);
} else {
linkingListener.remove();
}
};
}, [parseTestPayload]);
Expand Down

0 comments on commit a432e5f

Please sign in to comment.