1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

use actual empty array

This commit is contained in:
Matthias Kretschmann 2019-02-13 12:19:45 +01:00
parent 03af2e217c
commit f8405c8e5a
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -38,13 +38,13 @@ class Publish extends Component<{}, PublishState> {
name: '',
dateCreated: new Date(),
description: '',
files: [''],
files: [],
price: 0,
author: '',
type: 'dataset' as AssetType,
license: '',
copyrightHolder: '',
categories: [''],
categories: []
isPublishing: false,
isPublished: false,
publishedDid: '',
@ -60,11 +60,6 @@ class Publish extends Component<{}, PublishState> {
}
if (key === 'files') {
const filesArray =
this.state.files[0] === ''
? this.state.files.splice(1, 1)
: this.state.files
return (
<Row key={key}>
<Label htmlFor={key} required>
@ -73,7 +68,7 @@ class Publish extends Component<{}, PublishState> {
<Files
placeholder={value.placeholder}
help={value.help}
files={filesArray}
files={this.state.files}
/>
</Row>
)