mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
chore(react): fix leak in content widget
This commit is contained in:
parent
3ec2947c4f
commit
0f60c0696b
@ -21,6 +21,7 @@ import OtherSettings from "./options/other.jsx";
|
||||
import BackendLogWidget from "./content/backend_log.js";
|
||||
import MultiFactorAuthenticationSettings from "./options/multi_factor_authentication.js";
|
||||
import AiSettings from "./options/ai_settings.jsx";
|
||||
import { unmountComponentAtNode } from "preact/compat";
|
||||
|
||||
const TPL = /*html*/`<div class="note-detail-content-widget note-detail-printable">
|
||||
<style>
|
||||
@ -89,6 +90,7 @@ export default class ContentWidgetTypeWidget extends TypeWidget {
|
||||
}
|
||||
|
||||
async doRefresh(note: FNote) {
|
||||
unmountComponentAtNode(this.$content[0]);
|
||||
this.$content.empty();
|
||||
this.children = [];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user