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:
parent
03af2e217c
commit
f8405c8e5a
@ -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>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user