diff --git a/src/utils/schema.js b/src/utils/schema.js index 414590e7..9dd50ce5 100644 --- a/src/utils/schema.js +++ b/src/utils/schema.js @@ -62,7 +62,7 @@ module.exports.slugifyFormID = function(schema, prefix = "") { return prefix + schema.id; } else { // Return the slugified version of either: - return prefix + (schema.inputName || schema.label || schema.model) + return prefix + (schema.inputName || schema.label || schema.model || "") // NB: This is a very simple, conservative, slugify function, // avoiding extra dependencies. .toString() @@ -77,4 +77,4 @@ module.exports.slugifyFormID = function(schema, prefix = "") { // Remove anything that isn't a (English/ASCII) letter, number or dash. .replace(/([^a-zA-Z0-9-]+)/g, ""); } -}; \ No newline at end of file +};