mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 15:49:00 +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 BackendLogWidget from "./content/backend_log.js";
|
||||||
import MultiFactorAuthenticationSettings from "./options/multi_factor_authentication.js";
|
import MultiFactorAuthenticationSettings from "./options/multi_factor_authentication.js";
|
||||||
import AiSettings from "./options/ai_settings.jsx";
|
import AiSettings from "./options/ai_settings.jsx";
|
||||||
|
import { unmountComponentAtNode } from "preact/compat";
|
||||||
|
|
||||||
const TPL = /*html*/`<div class="note-detail-content-widget note-detail-printable">
|
const TPL = /*html*/`<div class="note-detail-content-widget note-detail-printable">
|
||||||
<style>
|
<style>
|
||||||
@ -89,6 +90,7 @@ export default class ContentWidgetTypeWidget extends TypeWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async doRefresh(note: FNote) {
|
async doRefresh(note: FNote) {
|
||||||
|
unmountComponentAtNode(this.$content[0]);
|
||||||
this.$content.empty();
|
this.$content.empty();
|
||||||
this.children = [];
|
this.children = [];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user