Skip to content

Commit

Permalink
Merge pull request #4638 from ueberdosis/feature/yProsemirror1.2.1
Browse files Browse the repository at this point in the history
chore: upgrades y-prosemirror to ^1.2.1. It used to be locked to 1.0.…
  • Loading branch information
janthurau committed Nov 18, 2023
2 parents 0f50b21 + 6e12777 commit 55377eb
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 12 deletions.
74 changes: 68 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/extension-collaboration-cursor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
],
"devDependencies": {
"@tiptap/core": "^2.2.0-rc.4",
"y-prosemirror": "1.0.20"
"y-prosemirror": "^1.2.1"
},
"peerDependencies": {
"@tiptap/core": "^2.0.0",
"y-prosemirror": "1.0.20"
"y-prosemirror": "^1.2.1"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/extension-collaboration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
"devDependencies": {
"@tiptap/core": "^2.2.0-rc.4",
"@tiptap/pm": "^2.2.0-rc.4",
"y-prosemirror": "1.0.20"
"y-prosemirror": "^1.2.1"
},
"peerDependencies": {
"@tiptap/core": "^2.0.0",
"@tiptap/pm": "^2.0.0",
"y-prosemirror": "1.0.20"
"y-prosemirror": "^1.2.1"
},
"repository": {
"type": "git",
Expand Down
6 changes: 4 additions & 2 deletions packages/extension-collaboration/src/collaboration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const Collaboration = Extension.create<CollaborationOptions>({
undoManager.restore = () => {}
}

const viewRet = originalUndoPluginView(view)
const viewRet = originalUndoPluginView ? originalUndoPluginView(view) : undefined

return {
destroy: () => {
Expand All @@ -142,7 +142,9 @@ export const Collaboration = Extension.create<CollaborationOptions>({
undoManager._observers = observers
}

viewRet.destroy()
if (viewRet?.destroy) {
viewRet.destroy()
}
},
}
}
Expand Down

0 comments on commit 55377eb

Please sign in to comment.