From 22a31979d011a88d280cb71787c538ba50600264 Mon Sep 17 00:00:00 2001 From: Dastiw1 Date: Fri, 15 Sep 2017 16:04:35 +0600 Subject: [PATCH] fix custom field import error from here: https://github.com/icebob/vue-form-generator/issues/225 --- src/utils/schema.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +};