Skip to content

Commit

Permalink
feat(vitepress): update observer.dispose to observer.complete
Browse files Browse the repository at this point in the history
  • Loading branch information
pearmini committed Mar 1, 2024
1 parent 0da959c commit bae11b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/genji-theme-vitepress/src/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function render() {
const code = pre.textContent.replace(/\n/g, "");
module.add(parser(code), {
next: (node) => mount(block, node),
dispose: unmount,
complete: unmount,
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/genji-theme-vitepress/src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class Module {
dispose() {
for (const variable of this._variables) {
const { value, observer } = variable;
if (observer.dispose) observer.dispose(value);
if (observer.complete) observer.complete(value);
}
this._variables = [];
}
Expand Down

0 comments on commit bae11b7

Please sign in to comment.