create error on call - fixes #569
This commit is contained in:
parent
1b0da31d00
commit
a099e98bd6
@ -145,7 +145,11 @@ hypercores and y-dat listens to changes and applies them to the Yjs document.
|
||||
</dd>
|
||||
<dt><a href="https://github.com/liveblocks/liveblocks">@liveblocks/yjs</a></dt>
|
||||
<dd>
|
||||
<a href="https://liveblocks.io/document/yjs">Liveblocks Yjs</a> provides a fully hosted WebSocket infrastructure and persisted data store for Yjs documents. No configuration or maintenance is required. It also features Yjs webhook events, REST API to read and update Yjs documents, and a browser DevTools extension.
|
||||
<a href="https://liveblocks.io/document/yjs">Liveblocks Yjs</a> provides a fully
|
||||
hosted WebSocket infrastructure and persisted data store for Yjs
|
||||
documents. No configuration or maintenance is required. It also features
|
||||
Yjs webhook events, REST API to read and update Yjs documents, and a
|
||||
browser DevTools extension.
|
||||
</dd>
|
||||
<dt><a href="https://github.com/yousefED/matrix-crdt">Matrix-CRDT</a></dt>
|
||||
<dd>
|
||||
|
@ -683,7 +683,7 @@ export const typeListInsertGenericsAfter = (transaction, parent, referenceItem,
|
||||
packJsonContent()
|
||||
}
|
||||
|
||||
const lengthExceeded = error.create('Length exceeded!')
|
||||
const lengthExceeded = () => error.create('Length exceeded!')
|
||||
|
||||
/**
|
||||
* @param {Transaction} transaction
|
||||
@ -696,7 +696,7 @@ const lengthExceeded = error.create('Length exceeded!')
|
||||
*/
|
||||
export const typeListInsertGenerics = (transaction, parent, index, content) => {
|
||||
if (index > parent._length) {
|
||||
throw lengthExceeded
|
||||
throw lengthExceeded()
|
||||
}
|
||||
if (index === 0) {
|
||||
if (parent._searchMarker) {
|
||||
@ -798,7 +798,7 @@ export const typeListDelete = (transaction, parent, index, length) => {
|
||||
n = n.right
|
||||
}
|
||||
if (length > 0) {
|
||||
throw lengthExceeded
|
||||
throw lengthExceeded()
|
||||
}
|
||||
if (parent._searchMarker) {
|
||||
updateMarkerChanges(parent._searchMarker, startIndex, -startLength + length /* in case we remove the above exception */)
|
||||
|
Loading…
x
Reference in New Issue
Block a user