Skip to content
Snippets Groups Projects
Unverified Commit d41222f4 authored by Tom Robinson's avatar Tom Robinson
Browse files

Misc fixes

parent f8ca9b98
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,9 @@ export function format(expr, { ...@@ -15,6 +15,9 @@ export function format(expr, {
aggregations = VALID_AGGREGATIONS aggregations = VALID_AGGREGATIONS
}, parens = false) { }, parens = false) {
const info = { tableMetadata, customFields, operators, aggregations }; const info = { tableMetadata, customFields, operators, aggregations };
if (expr == null) {
return "";
}
if (typeof expr === "number") { if (typeof expr === "number") {
return formatLiteral(expr); return formatLiteral(expr);
} }
......
...@@ -287,7 +287,7 @@ export function suggest(source, { ...@@ -287,7 +287,7 @@ export function suggest(source, {
prefixTrim: /\w+$/, prefixTrim: /\w+$/,
postfixTrim: /^\w+\s*/ postfixTrim: /^\w+\s*/
}))) })))
finalSuggestions.push(...Object.keys(customFields).map(expressionName => ({ finalSuggestions.push(...Object.keys(customFields || {}).map(expressionName => ({
type: "fields", type: "fields",
name: expressionName, name: expressionName,
text: formatExpressionName(expressionName) + " ", text: formatExpressionName(expressionName) + " ",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment