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
When a Loro map value is an empty object, calling .toJSON() on the Loro map will omit the value. This is specifically a problem in loro-prosemirror where the attributes key is often an empty object. This is specifically a problem in nested containers as top level values will return an empty object, but for nested values inside Loro Lists etc. the value is completely omitted even though the data is being detected in the batch event diff. For example setting text as bold in prosemirror will trigger a change event on the map that will return diff: [{ attributes: bold: {}, retain: 1 }] but calling .toJSON() on that map will return attributes: {}. Update: Was reading the logs wrong, as it was changing the attributes value on the LoroText instead of the Map.
The text was updated successfully, but these errors were encountered:
When a Loro map value is an empty object, calling
.toJSON()
on the Loro map will omit the value. This is specifically a problem in loro-prosemirror where the attributes key is often an empty object. This is specifically a problem in nested containers as top level values will return an empty object, but for nested values inside Loro Lists etc. the value is completely omitted even though the data is being detected in the batch event diff. For example setting text as bold in prosemirror will trigger a change event on the map that will returndiff: [{ attributes: bold: {}, retain: 1 }]
but calling.toJSON()
on that map will returnattributes: {}
. Update: Was reading the logs wrong, as it was changing the attributes value on the LoroText instead of the Map.The text was updated successfully, but these errors were encountered: