@brett_lamy/docstream-editor 0.8.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/editor/Editor.tsx +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brett_lamy/docstream-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "TipTap editor for Docstream GitBook-style markdown documents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"./styles.css": "./src/styles.css"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@brett_lamy/docstream": "0.
|
|
36
|
+
"@brett_lamy/docstream": "1.0.0",
|
|
37
37
|
"gpu-lexer": "0.0.2",
|
|
38
38
|
"lucide-react": "^1.17.0"
|
|
39
39
|
},
|
package/src/editor/Editor.tsx
CHANGED
|
@@ -295,7 +295,8 @@ export function GitbookEditor({
|
|
|
295
295
|
}, [editor, onEditorReady])
|
|
296
296
|
|
|
297
297
|
useEffect(() => {
|
|
298
|
-
|
|
298
|
+
// StrictMode (and <Activity>) re-run effects against an editor useEditor has already destroyed.
|
|
299
|
+
if (!editor || editor.isDestroyed || !controlled) return
|
|
299
300
|
if (markdown === lastEmitted.current) return
|
|
300
301
|
lastEmitted.current = markdown as string
|
|
301
302
|
const doc = parseMarkdown(markdown as string)
|