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

More robust metadata handling if we don't have field_values

parent 5fe8e8e8
No related branches found
No related tags found
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.
Finish editing this message first!
Please register or to comment