mirror of
https://github.com/docmost/docmost.git
synced 2026-08-27 08:47:06 +08:00
feat: package updates (#2300)
* package updates * update tiptap * fix editor crash * fix * update list * fix(theme): size badges to their content * fix mantine avatar color regression
This commit is contained in:
@@ -105,7 +105,7 @@ export default function TemplateEditor() {
|
||||
|
||||
// Load template data into editor
|
||||
useEffect(() => {
|
||||
if (existingTemplate && editor) {
|
||||
if (existingTemplate && editor && !editor.isDestroyed) {
|
||||
loadedRef.current = false;
|
||||
setTitle(existingTemplate.title || "");
|
||||
setIcon(existingTemplate.icon || null);
|
||||
@@ -383,7 +383,8 @@ export default function TemplateEditor() {
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
e.preventDefault();
|
||||
editor?.commands.focus("start");
|
||||
if (editor && !editor.isDestroyed)
|
||||
editor.commands.focus("start");
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user