diff --git a/src/toolbar/buttons/repl/ReplButton.test.tsx b/src/toolbar/buttons/repl/ReplButton.test.tsx
index 8c897143..00b3900d 100644
--- a/src/toolbar/buttons/repl/ReplButton.test.tsx
+++ b/src/toolbar/buttons/repl/ReplButton.test.tsx
@@ -14,7 +14,7 @@ afterEach(() => {
it('should dispatch action when clicked', async () => {
const [user, button, dispatch] = testRender(, {
- hub: { runtime: HubRuntimeState.Idle },
+ hub: { hasRepl: true, runtime: HubRuntimeState.Idle },
});
await user.click(button.getByRole('button', { name: 'REPL' }));
diff --git a/src/toolbar/buttons/repl/ReplButton.tsx b/src/toolbar/buttons/repl/ReplButton.tsx
index e1ad5e7a..34ffa441 100644
--- a/src/toolbar/buttons/repl/ReplButton.tsx
+++ b/src/toolbar/buttons/repl/ReplButton.tsx
@@ -13,7 +13,7 @@ import icon from './icon.svg';
type ReplButtonProps = Pick;
const ReplButton: React.VoidFunctionComponent = ({ id }) => {
- const { runtime, useLegacyDownload } = useSelector((s) => s.hub);
+ const { runtime, useLegacyDownload, hasRepl } = useSelector((s) => s.hub);
const i18n = useI18n();
const dispatch = useDispatch();
@@ -28,7 +28,7 @@ const ReplButton: React.VoidFunctionComponent = ({ id }) => {
label={i18n.translate('label')}
tooltip={i18n.translate('tooltip')}
icon={icon}
- enabled={runtime === HubRuntimeState.Idle}
+ enabled={hasRepl && runtime === HubRuntimeState.Idle}
onAction={action}
/>
);