We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e1d146 commit 0b70a82Copy full SHA for 0b70a82
src/ProtectedRoute.tsx
@@ -31,7 +31,8 @@ const ProtectedRoute: React.FunctionComponent<ProtectedRouteProps> = ({
31
};
32
33
if (sessionToken) {
34
- warrants.forEach((warrant) => {
+ let warrantsToCheck = [...warrants].map(warrant => ({...warrant}));
35
+ warrantsToCheck.forEach((warrant) => {
36
if (computedMatch.params[warrant.objectId]) {
37
/** @ts-ignore */
38
warrant.objectId = computedMatch.params[warrant.objectId];
@@ -42,7 +43,7 @@ const ProtectedRoute: React.FunctionComponent<ProtectedRouteProps> = ({
42
43
}
44
})
45
- checkForWarrant({ op, warrants });
46
+ checkForWarrant({ op, warrants: warrantsToCheck });
47
48
}, [sessionToken]);
49
0 commit comments