Skip to content

Commit

Permalink
fix(WebAppProvider): fix script loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Razzwan committed Nov 13, 2023
1 parent 0e5e5b6 commit 9eacc63
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@altiore/twa",
"version": "1.2.7",
"version": "1.2.8",
"description": "React components for Telegram WebApp",
"source": "./src/index.ts",
"type": "module",
Expand Down
9 changes: 0 additions & 9 deletions src/WebAppProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,9 @@ const WebAppProvider = ({
scriptEle.addEventListener('load', successListener);

scriptEle.addEventListener('error', errorListener);

return () => {
scriptEle.removeEventListener('load', successListener);
scriptEle.removeEventListener('error', errorListener);
};
} catch (err) {
console.error(err);
}

return () => {};
},
[setIsLoaded, setIsLoading, setWebApp],
);
Expand Down Expand Up @@ -136,8 +129,6 @@ const WebAppProvider = ({
setIsLoaded(false);
setIsLoading(false);
}

return () => {};
}, [subscribeScriptLoading, isLoading, isLoaded]);

const systemValue = useMemo(createSystemContextValue, []);
Expand Down

0 comments on commit 9eacc63

Please sign in to comment.