refactor(editor): Stricter linting for promises and async functions (no-changelog) (#4642)
This commit is contained in:
@@ -27,7 +27,7 @@ export function useHistoryHelper(activeRoute: Route) {
|
||||
|
||||
const isNDVOpen = ref<boolean>(ndvStore.activeNodeName !== null);
|
||||
|
||||
const undo = () =>
|
||||
const undo = async () =>
|
||||
callDebounced(
|
||||
async () => {
|
||||
const command = historyStore.popUndoableToUndo();
|
||||
@@ -56,7 +56,7 @@ export function useHistoryHelper(activeRoute: Route) {
|
||||
{ debounceTime: UNDO_REDO_DEBOUNCE_INTERVAL },
|
||||
);
|
||||
|
||||
const redo = () =>
|
||||
const redo = async () =>
|
||||
callDebounced(
|
||||
async () => {
|
||||
const command = historyStore.popUndoableToRedo();
|
||||
@@ -113,9 +113,9 @@ export function useHistoryHelper(activeRoute: Route) {
|
||||
event.preventDefault();
|
||||
if (!isNDVOpen.value) {
|
||||
if (event.shiftKey) {
|
||||
redo();
|
||||
void redo();
|
||||
} else {
|
||||
undo();
|
||||
void undo();
|
||||
}
|
||||
} else if (!event.shiftKey) {
|
||||
trackUndoAttempt(event);
|
||||
|
||||
Reference in New Issue
Block a user