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 c0f5fb8 commit 7392febCopy full SHA for 7392feb
packages/cubejs-playground/src/DashboardSource.js
@@ -72,6 +72,9 @@ class DashboardSource {
72
73
parse(sourceFiles) {
74
this.appFile = sourceFiles.find(f => f.fileName.indexOf('src/App.js') !== -1);
75
+ if (!this.appFile) {
76
+ throw new Error(`src/App.js file not found. Can't parse dashboard app.`);
77
+ }
78
this.appAst = parse(this.appFile.content, {
79
sourceFilename: this.appFile.fileName,
80
sourceType: 'module',
@@ -252,7 +255,7 @@ class DashboardSource {
252
255
}
253
256
254
257
dashboardAppCode() {
- return generator(this.appAst, {}, this.appFile.content).code;
258
+ return this.appAst && generator(this.appAst, {}, this.appFile.content).code;
259
260
261
0 commit comments