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 1
1
# Changelog for ` react-static-web-apps-auth `
2
2
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
+
3
9
## [ 1.5.0] - 2024-01-12
4
10
5
11
### Added
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @aaronpowell/react-static-web-apps-auth" ,
3
- "version" : " 1.5.0 " ,
3
+ "version" : " 1.5.1 " ,
4
4
"description" : " A library to help creating authenticated React apps on Azure Static Web Apps" ,
5
5
"main" : " build/index.js" ,
6
6
"types" : " build/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -40,11 +40,11 @@ const ClientPrincipalContextProvider = ({
40
40
const [ swaCookie , setSwaCookie ] = useState < string | null > ( null ) ;
41
41
42
42
useEffect ( ( ) => {
43
- // const abortController = new AbortController();
43
+ const abortController = new AbortController ( ) ;
44
44
const run = async ( ) => {
45
45
try {
46
46
const res = await fetch ( "/.auth/me" , {
47
- // signal: abortController.signal,
47
+ signal : abortController . signal ,
48
48
} ) ;
49
49
const json : {
50
50
clientPrincipal : ClientPrincipal | null ;
@@ -76,7 +76,7 @@ const ClientPrincipalContextProvider = ({
76
76
77
77
run ( ) ;
78
78
79
- // return () => abortController.abort();
79
+ return ( ) => abortController . abort ( ) ;
80
80
} , [ ] ) ;
81
81
82
82
return (
You can’t perform that action at this time.
0 commit comments