Fix uploaded files being previewed on wrong channels (#2860)
Этот коммит содержится в:
@@ -49,15 +49,15 @@ class FileUpload extends React.Component {
|
||||
fileUploadSuccess(channelId, data) {
|
||||
this.props.onFileUpload(data.filenames, data.client_ids, channelId);
|
||||
|
||||
const requests = JSON.parse(JSON.stringify(this.state.requests));
|
||||
const requests = Object.assign({}, this.state.requests);
|
||||
for (var j = 0; j < data.client_ids.length; j++) {
|
||||
Reflect.deleteProperty(requests, data.client_ids[j]);
|
||||
}
|
||||
this.setState({requests});
|
||||
}
|
||||
|
||||
fileUploadFail(clientId, err) {
|
||||
this.props.onUploadError(err, clientId);
|
||||
fileUploadFail(clientId, channelId, err) {
|
||||
this.props.onUploadError(err, clientId, channelId);
|
||||
}
|
||||
|
||||
uploadFiles(files) {
|
||||
@@ -86,7 +86,7 @@ class FileUpload extends React.Component {
|
||||
channelId,
|
||||
clientId,
|
||||
this.fileUploadSuccess.bind(this, channelId),
|
||||
this.fileUploadFail.bind(this, clientId)
|
||||
this.fileUploadFail.bind(this, clientId, channelId)
|
||||
);
|
||||
|
||||
const requests = this.state.requests;
|
||||
|
||||
Ссылка в новой задаче
Block a user