Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
waralexrom committed Sep 20, 2024
1 parent 1025216 commit 83e5a40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,10 @@ export class CubeEvaluator extends CubeSymbols {

public isInstanceOfType(type: 'measures' | 'dimensions' | 'segments', path: string | string[]): boolean {
const cubeAndName = Array.isArray(path) ? path : path.split('.');
return this.evaluatedCubes[cubeAndName[0]] &&
const symbol = this.evaluatedCubes[cubeAndName[0]] &&
this.evaluatedCubes[cubeAndName[0]][type] &&
this.evaluatedCubes[cubeAndName[0]][type][cubeAndName[1]];
return symbol !== undefined;
}

public byPathAnyType(path: string[]) {
Expand Down
2 changes: 0 additions & 2 deletions packages/cubejs-schema-compiler/src/compiler/CubeSymbols.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,6 @@ export class CubeSymbols {
const parentIndex = currResolveIndexFn();
cube = this.cubeDependenciesProxy(parentIndex, newCubeName);
return cube;
} else if (this.symbols[cubeName]?.[name]) {
depsResolveFn(name, undefined);
}
}
return cube || (this.symbols[cubeName] && this.symbols[cubeName][name]);
Expand Down

0 comments on commit 83e5a40

Please sign in to comment.