File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
react-static-web-apps-auth Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11# Changelog for ` react-static-web-apps-auth `
22
3+ ## [ 1.5.1] - 2024-01-12
4+
5+ ### Fixed
6+
7+ - Accidentally shipped the ` AbortController ` commented out - don't test in production kids!
8+
39## [ 1.5.0] - 2024-01-12
410
511### Added
Original file line number Diff line number Diff line change 11{
22 "name" : " @aaronpowell/react-static-web-apps-auth" ,
3- "version" : " 1.5.0 " ,
3+ "version" : " 1.5.1 " ,
44 "description" : " A library to help creating authenticated React apps on Azure Static Web Apps" ,
55 "main" : " build/index.js" ,
66 "types" : " build/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -40,11 +40,11 @@ const ClientPrincipalContextProvider = ({
4040 const [ swaCookie , setSwaCookie ] = useState < string | null > ( null ) ;
4141
4242 useEffect ( ( ) => {
43- // const abortController = new AbortController();
43+ const abortController = new AbortController ( ) ;
4444 const run = async ( ) => {
4545 try {
4646 const res = await fetch ( "/.auth/me" , {
47- // signal: abortController.signal,
47+ signal : abortController . signal ,
4848 } ) ;
4949 const json : {
5050 clientPrincipal : ClientPrincipal | null ;
@@ -76,7 +76,7 @@ const ClientPrincipalContextProvider = ({
7676
7777 run ( ) ;
7878
79- // return () => abortController.abort();
79+ return ( ) => abortController . abort ( ) ;
8080 } , [ ] ) ;
8181
8282 return (
You can’t perform that action at this time.
0 commit comments