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 322c40e commit 5f7517dCopy full SHA for 5f7517d
src/ProtectedComponent.tsx
@@ -11,7 +11,7 @@ const ProtectedComponent: React.FunctionComponent<ProtectedComponentProps> = ({
11
const { sessionToken, hasWarrant } = useWarrant();
12
13
useEffect(() => {
14
- if (!warrants) {
+ if (!warrants || warrants.length === 0) {
15
throw new Error("Invalid or no warrants provided to ProtectedComponent");
16
}
17
0 commit comments