Skip to content

Commit

Permalink
chore(json-crdt-extensions): 🤖 update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Apr 19, 2024
1 parent fde38b3 commit dfc3e03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/json-crdt-extensions/peritext/slice/Slices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {CONST, updateNum} from '../../../json-hash';
import {printTree} from '../../../util/print/printTree';
import {SliceBehavior, SliceHeaderShift} from './constants';
import {SplitSlice} from './SplitSlice';
import {Slice} from './types';
import {VecNode} from '../../../json-crdt/nodes';
import type {Slice} from './types';
import type {ITimespanStruct, ITimestampStruct} from '../../../json-crdt-patch/clock';
import type {SliceType, Stateful} from '../types';
import type {Peritext} from '../Peritext';
Expand Down Expand Up @@ -66,7 +66,7 @@ export class Slices implements Stateful, Printable {
const rga = txt.str;
const model = txt.model;
const tupleId = chunk.data ? chunk.data[0] : undefined;
if (!tupleId) throw new Error('MARKER_NOT_FOUND');
if (!tupleId) throw new Error('SLICE_NOT_FOUND');
const tuple = model.index.get(tupleId);
if (!(tuple instanceof VecNode)) throw new Error('NOT_TUPLE');
let slice = PersistedSlice.deserialize(txt, rga, chunk, tuple);
Expand Down

0 comments on commit dfc3e03

Please sign in to comment.