Skip to content

Commit

Permalink
fix(editor): Restore expression completions (#6566)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov authored Jul 4, 2023
1 parent 075fd02 commit 516e572
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/editor-ui/src/plugins/codemirror/completions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,21 @@ export const isAllowedInDotNotation = (str: string) => {
// ----------------------------------

export function receivesNoBinaryData() {
return resolveParameter('={{ $binary }}')?.data === undefined;
try {
return resolveParameter('={{ $binary }}')?.data === undefined;
} catch {
return true;
}
}

export function hasNoParams(toResolve: string) {
const params = resolveParameter(`={{ ${toResolve}.params }}`);
let params;

try {
params = resolveParameter(`={{ ${toResolve}.params }}`);
} catch {
return true;
}

if (!params) return true;

Expand Down

0 comments on commit 516e572

Please sign in to comment.