Skip to content
Snippets Groups Projects
Commit 9e888eac authored by Tom Robinson's avatar Tom Robinson Committed by GitHub
Browse files

Merge pull request #2842 from metabase/more-robust-mbql-canonicalize

More robust mbqlCanonicalize, just in case
parents a9356561 a1a7b8ba
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ export function createQuery(type = "query", databaseId, tableId) {
return dataset_query;
}
const mbqlCanonicalize = (a) => a.toLowerCase().replace(/_/g, "-");
const mbqlCanonicalize = (a) => typeof a === "string" ? a.toLowerCase().replace(/_/g, "-") : a;
const mbqlCompare = (a, b) => mbqlCanonicalize(a) === mbqlCanonicalize(b)
var Query = {
......
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