Skip to content

Commit b0cfb50

Browse files
author
Ives van Hoorne
committed
Fix
1 parent fea32a8 commit b0cfb50

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/app/pages/Sandbox/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ class SandboxPage extends React.PureComponent<Props, $FlowFixMeState> {
131131
<Container>
132132
<ThemeProvider
133133
theme={{
134-
templateColor: getTemplateDefinition(sandbox.template).color,
134+
templateColor: getTemplateDefinition(sandbox && sandbox.template)
135+
.color,
135136
}}
136137
>
137138
<Editor match={match} sandbox={sandbox} />

src/common/templates/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ export const vue = {
1111
};
1212

1313
export default function getDefinition(theme: 'create-react-app' | 'vue-cli') {
14+
if (!theme) {
15+
return react;
16+
}
17+
1418
if (theme === react.name) {
1519
return react;
1620
} else if (theme === vue.name) {

0 commit comments

Comments
 (0)