Skip to content

Commit 662aaf8

Browse files
committed
Fix accidental shipping of commented out code
1 parent 7beab82 commit 662aaf8

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
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

react-static-web-apps-auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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",

react-static-web-apps-auth/src/ClientPrincipalContext.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 (

0 commit comments

Comments
 (0)