Skip to content
Snippets Groups Projects
Commit 84b9bae2 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

Merge pull request #1850 from metabase/fix-metadata-crash-and-unknown-field

More robust metadata handling if we don't have field_values
parents e6445685 5f2500a2
Branches
Tags
No related merge requests found
......@@ -149,7 +149,7 @@ function equivalentArgument(field, table) {
}
if (isCategory(field)) {
if (field.id in table.field_values && table.field_values[field.id].length > 0) {
if (table.field_values && field.id in table.field_values && table.field_values[field.id].length > 0) {
let validValues = table.field_values[field.id];
// this sort function works for both numbers and strings:
validValues.sort((a, b) => a === b ? 0 : (a < b ? -1 : 1));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment