You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * @param {Y.Snapshot} snapshot * @param {Y.Snapshot} prevSnapshot * @param {Object} pluginState */_renderSnapshot(snapshot,prevSnapshot,pluginState){if(!snapshot){snapshot=Y.snapshot(this.doc)}// clear mapping because we are going to rerenderthis.mapping=newMap()this.mux(()=>{this.doc.transact((transaction)=>{// before rendering, we are going to sanitize ops and split deleted ops// if they were deleted by seperate users.constpud=pluginState.permanentUserData// pud == nullif(pud){pud.dss.forEach((ds)=>{Y.iterateDeletedStructs(transaction,ds,(_item)=>{})})}/** * @param {'removed'|'added'} type * @param {Y.ID} id */constcomputeYChange=(type,id)=>{constuser=type==='added'
? pud.getUserByClientId(id.client)
: pud.getUserByDeletedId(id)// TypeError: Cannot read properties of null (reading 'getUserByClientId')
The text was updated successfully, but these errors were encountered:
Checklist
Describe the bug
the
prosemirror-versions
demo throws TypeErrorwhen
permanentUserData
is not passed toySyncPlugin
To Reproduce
in yjs-demos/prosemirror-versions/prosemirror-versions.js
replace
with
edit, create snapshot
edit, create snapshot
click old snapshot -> error
Expected behavior
better error message or different error handling
Environment Information
[email protected]
Additional context
the error is caused by this call
which calls
y-prosemirror/src/plugins/sync-plugin.js
The text was updated successfully, but these errors were encountered: