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 d29b367 commit 079e514Copy full SHA for 079e514
packages/app/src/app/components/CreateNewSandbox/CreateSandbox/TemplateList/TemplateList.tsx
@@ -287,6 +287,10 @@ export const TemplateList = ({
287
288
const template = getTemplateByIndex(num - 1);
289
290
+ if (!template) {
291
+ return;
292
+ }
293
+
294
track('Template Modal - Open Sandbox', { source: 'num-keys' });
295
openSandbox(template.sandbox);
296
}
@@ -309,6 +313,11 @@ export const TemplateList = ({
309
313
e.preventDefault();
310
314
const currentTemplate = getTemplateByIndex(focusedTemplateIndex);
311
315
316
+ if (!currentTemplate) {
317
+ // There are no sandboxes
318
319
320
312
321
track('Template Modal - Open Sandbox', { source: 'enter' });
322
openSandbox(currentTemplate.sandbox, isMac ? e.metaKey : e.ctrlKey);
323
0 commit comments