Skip to content

Commit 03bc5d3

Browse files
committed
fix(fe): empty token it is a valid token
1 parent d7f705d commit 03bc5d3

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

frontend/src/components/actors/guard-connectable-inspector.tsx

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,7 @@ function useActorEngineContext({ actorId }: { actorId: ActorId }) {
231231
const provider = useEngineCompatDataProvider();
232232

233233
const actorContext = useMemo(() => {
234-
return engineToken
235-
? createInspectorActorContext({
234+
return createInspectorActorContext({
236235
url: getConfig().apiUrl,
237236
token: async () => {
238237
const runner = await queryClient.fetchQuery(
@@ -245,9 +244,8 @@ function useActorEngineContext({ actorId }: { actorId: ActorId }) {
245244
);
246245
},
247246
engineToken,
248-
})
249-
: null;
250-
}, [actor?.runner, provider.runnerByNameQueryOptions, engineToken]);
247+
});
248+
}, [actorId, actor?.runner, provider.runnerByNameQueryOptions, engineToken]);
251249

252250
return { actorContext, actor, runner, isLoading };
253251
}
@@ -273,24 +271,6 @@ function ActorEngineProvider({
273271
);
274272
}
275273

276-
if (!actorContext) {
277-
return (
278-
<InspectorGuardContext.Provider
279-
value={
280-
<Info>
281-
<p>Unable to connect to the Actor's Inspector.</p>
282-
<p>
283-
Your namespace is missing an engine token. Please
284-
report this to Rivet support.
285-
</p>
286-
</Info>
287-
}
288-
>
289-
{children}
290-
</InspectorGuardContext.Provider>
291-
);
292-
}
293-
294274
return (
295275
<ActorProvider value={actorContext}>
296276
<InspectorGuard actorId={actorId}>{children}</InspectorGuard>

0 commit comments

Comments
 (0)