Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/utils/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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, "");
}
};
};