This commit is contained in:
parent
366dce1758
commit
70b363f4c3
|
@ -207,6 +207,15 @@ export class NoteManager {
|
|||
executeInterruptor: () => Promise<void>,
|
||||
} {
|
||||
const note = this.get(id);
|
||||
if (noteViewInterruptors.length === 0) {
|
||||
// noteViewInterruptorがない場合はcomputed noteを直接渡す
|
||||
return {
|
||||
interruptedNote: note as InterruptedCachedNote,
|
||||
interruptorUnwatch: () => { },
|
||||
executeInterruptor: () => Promise.resolve(),
|
||||
};
|
||||
}
|
||||
|
||||
const interruptedNote = ref<Note | null>(note.value);
|
||||
|
||||
async function executeInterruptor() {
|
||||
|
@ -215,11 +224,6 @@ export class NoteManager {
|
|||
return;
|
||||
}
|
||||
|
||||
if (noteViewInterruptors.length === 0) {
|
||||
interruptedNote.value = note.value;
|
||||
return;
|
||||
}
|
||||
|
||||
let result = deepClone(note.value);
|
||||
for (const interruptor of noteViewInterruptors) {
|
||||
result = await interruptor.handler(result) as Note;
|
||||
|
|
Loading…
Reference in New Issue