From caf08b1021d529d6f8f9ca2c8af736d7f2038a28 Mon Sep 17 00:00:00 2001 From: Nazar Gargol Date: Mon, 13 Jul 2020 20:30:32 +1200 Subject: [PATCH] Fixed members CSV uploader for non-devExperiments version --- .../admin/app/components/modal-import-members.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ghost/admin/app/components/modal-import-members.js b/ghost/admin/app/components/modal-import-members.js index 241e095484..dcb325e196 100644 --- a/ghost/admin/app/components/modal-import-members.js +++ b/ghost/admin/app/components/modal-import-members.js @@ -209,13 +209,17 @@ export default ModalComponent.extend({ }, upload() { - if (this.file && this.mapping.getKeyByValue('email')) { - this.generateRequest(); + if (this.config.get('enableDeveloperExperiments')) { + if (this.file && this.mapping.getKeyByValue('email')) { + this.generateRequest(); + } else { + this.set('uploadErrors', [{ + message: 'Import as "Email" value is missing.', + context: 'The CSV import has to have selected import as "Email" field.' + }]); + } } else { - this.set('uploadErrors', [{ - message: 'Import as "Email" value is missing.', - context: 'The CSV import has to have selected import as "Email" field.' - }]); + this.generateRequest(); } },