mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-30 08:36:54 +02:00
Fix linting
This commit is contained in:
parent
c942c43ea7
commit
d4d0f5c42d
@ -98,9 +98,11 @@ class Mutator {
|
||||
},
|
||||
async () => {
|
||||
await beforeUndo?.()
|
||||
const awaits = []
|
||||
for (const block of blocks) {
|
||||
await octoClient.deleteBlock(block.id)
|
||||
awaits.push(octoClient.deleteBlock(block.id))
|
||||
}
|
||||
await Promise.all(awaits)
|
||||
},
|
||||
description,
|
||||
this.undoGroupId,
|
||||
|
@ -128,11 +128,16 @@ class UndoManager {
|
||||
}
|
||||
|
||||
const currentGroupId = command.groupId
|
||||
if (currentGroupId) {
|
||||
do {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await this.execute(command, 'undo')
|
||||
this.index -= 1
|
||||
command = this.commands[this.index]
|
||||
} while (this.index >= 0 && currentGroupId && currentGroupId === command.groupId)
|
||||
} while (this.index >= 0 && currentGroupId === command.groupId)
|
||||
} else {
|
||||
await this.execute(command, 'undo')
|
||||
}
|
||||
|
||||
if (this.onStateDidChange) {
|
||||
this.onStateDidChange()
|
||||
@ -151,11 +156,16 @@ class UndoManager {
|
||||
}
|
||||
|
||||
const currentGroupId = command.groupId
|
||||
if (currentGroupId) {
|
||||
do {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await this.execute(command, 'redo')
|
||||
this.index += 1
|
||||
command = this.commands[this.index + 1]
|
||||
} while (this.index < this.commands.length - 1 && currentGroupId && currentGroupId === command.groupId)
|
||||
} while (this.index < this.commands.length - 1 && currentGroupId === command.groupId)
|
||||
} else {
|
||||
await this.execute(command, 'redo')
|
||||
}
|
||||
|
||||
if (this.onStateDidChange) {
|
||||
this.onStateDidChange()
|
||||
|
Loading…
Reference in New Issue
Block a user