From a1a7b8baf00926c2b7a58b6b0bcc0f4d6ff4d608 Mon Sep 17 00:00:00 2001 From: Tom Robinson <tlrobinson@gmail.com> Date: Mon, 27 Jun 2016 15:45:57 -0700 Subject: [PATCH] More robust mbqlCanonicalize, just in case --- frontend/src/metabase/lib/query.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/metabase/lib/query.js b/frontend/src/metabase/lib/query.js index 4f498231bd1..c70be0e9a1d 100644 --- a/frontend/src/metabase/lib/query.js +++ b/frontend/src/metabase/lib/query.js @@ -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 = { -- GitLab