Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix custom field error #290

Merged
merged 2 commits into from
Sep 15, 2017
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, "");
}
};
};