mirror of
https://github.com/jacobtread/obsidian-timekeep.git
synced 2026-07-22 10:10:27 +00:00
fix: remove unmount logic, causes rendering issue
Removing the unmounting logic since it causes an unmount when the content is unloaded from leaving the viewport
This commit is contained in:
parent
9eca52aedb
commit
efab24eae0
1 changed files with 0 additions and 15 deletions
15
src/main.ts
15
src/main.ts
|
|
@ -116,19 +116,4 @@ function renderTimekeep(
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
const observer = new MutationObserver((_, observer) => {
|
||||
if (!reactWrapper.isConnected) {
|
||||
// Unmount the react component
|
||||
root.unmount();
|
||||
// Disconnect the observer
|
||||
observer.disconnect();
|
||||
}
|
||||
});
|
||||
|
||||
// Observe the document for changes
|
||||
observer.observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue