Fix: clicking on the import custom emojis button, without selected any file, was resulting in a state with all action button disabled.
This commit is contained in:
parent
4149207317
commit
1be95f01b1
@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 10.1.2
|
||||||
|
|
||||||
|
* Fix: clicking on the import custom emojis button, without selected any file, was resulting in a state with all action button disabled.
|
||||||
|
|
||||||
## 10.1.1
|
## 10.1.1
|
||||||
|
|
||||||
* Fix #436: Saving emojis per batch, to avoid hitting max payload limit.
|
* Fix #436: Saving emojis per batch, to avoid hitting max payload limit.
|
||||||
|
@ -132,7 +132,6 @@ export class ChannelEmojisElement extends LivechatElement {
|
|||||||
*/
|
*/
|
||||||
public async importEmojis (ev: Event): Promise<void> {
|
public async importEmojis (ev: Event): Promise<void> {
|
||||||
ev.preventDefault()
|
ev.preventDefault()
|
||||||
this.actionDisabled = true
|
|
||||||
try {
|
try {
|
||||||
// download a json file:
|
// download a json file:
|
||||||
const file = await new Promise<File>((resolve, reject) => {
|
const file = await new Promise<File>((resolve, reject) => {
|
||||||
@ -153,6 +152,8 @@ export class ChannelEmojisElement extends LivechatElement {
|
|||||||
input.remove()
|
input.remove()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.actionDisabled = true
|
||||||
|
|
||||||
const content = await new Promise<string>((resolve, reject) => {
|
const content = await new Promise<string>((resolve, reject) => {
|
||||||
const fileReader = new FileReader()
|
const fileReader = new FileReader()
|
||||||
fileReader.onerror = reject
|
fileReader.onerror = reject
|
||||||
|
Loading…
x
Reference in New Issue
Block a user