Skip to content

Commit 15d2de6

Browse files
committed
await追加&コードを周りに合わせた
1 parent 7f068bd commit 15d2de6

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/components/Menu/MenuBar/BaseMenuBar.vue

+8-6
Original file line numberDiff line numberDiff line change
@@ -342,19 +342,21 @@ const menudata = computed<MenuItemData[]>(() => [
342342
{
343343
type: "button",
344344
label: "元に戻す",
345-
onClick: () => {
346-
if (uiLocked.value) return;
347-
store.dispatch("UNDO", { editor: props.editor });
345+
onClick: async () => {
346+
if (!uiLocked.value) {
347+
await store.dispatch("UNDO", { editor: props.editor });
348+
}
348349
},
349350
disabled: !canUndo.value,
350351
disableWhenUiLocked: true,
351352
},
352353
{
353354
type: "button",
354355
label: "やり直す",
355-
onClick: () => {
356-
if (uiLocked.value) return;
357-
store.dispatch("REDO", { editor: props.editor });
356+
onClick: async () => {
357+
if (!uiLocked.value) {
358+
await store.dispatch("REDO", { editor: props.editor });
359+
}
358360
},
359361
disabled: !canRedo.value,
360362
disableWhenUiLocked: true,

src/store/singing.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2024,9 +2024,9 @@ export const singingStore = createPartialStore<SingingStoreTypes>({
20242024
},
20252025

20262026
COMMAND_CUT_NOTES_TO_CLIPBOARD: {
2027-
action({ dispatch }) {
2028-
dispatch("COPY_NOTES_TO_CLIPBOARD");
2029-
dispatch("COMMAND_REMOVE_SELECTED_NOTES");
2027+
async action({ dispatch }) {
2028+
await dispatch("COPY_NOTES_TO_CLIPBOARD");
2029+
await dispatch("COMMAND_REMOVE_SELECTED_NOTES");
20302030
},
20312031
},
20322032

0 commit comments

Comments
 (0)