From fc2f96cfd183703374bbf2709314d389c743dc8e Mon Sep 17 00:00:00 2001 From: Vineesh Jain <44682879+VineeshJain@users.noreply.github.com> Date: Mon, 3 Jun 2019 14:08:57 -0700 Subject: [PATCH] Revert "issue-710 fixed array of objects not validating" --- modules/st2-auto-form/fields/array.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/st2-auto-form/fields/array.js b/modules/st2-auto-form/fields/array.js index 110892342..d77a088e5 100644 --- a/modules/st2-auto-form/fields/array.js +++ b/modules/st2-auto-form/fields/array.js @@ -21,7 +21,7 @@ const typeChecks = (type, value) => { case 'integer': return !validator.isInt(v) && `'${v}' is not an integer`; case 'object': - return !_.isPlainObject(value) && `'${v}' is not an object`; + return !_.isPlainObject(v) && `'${v}' is not an object`; case 'string': default: return false; @@ -79,10 +79,6 @@ export default class ArrayField extends BaseTextField { return v; } - if (Array.isArray(v) && this.props.spec.items.type === 'object') { - return JSON.stringify(v); - } - const { secret } = this.props.spec || {}; if (secret && v && !Array.isArray(v)) { return v;