fix: recover plain table row index errors
This commit is contained in:
@@ -88,6 +88,9 @@ describe('isRecoverableEditorTransformError', () => {
|
||||
expect(isRecoverableEditorTransformError(new RangeError(
|
||||
'Index 1 out of range for <tableRow(tableCell(tableParagraph("A")))>',
|
||||
))).toBe(true)
|
||||
expect(isRecoverableEditorTransformError(new Error(
|
||||
'Index 1 out of range for <tableRow(tableCell(tableParagraph("A")))>',
|
||||
))).toBe(true)
|
||||
expect(isRecoverableEditorTransformError(new Error(
|
||||
'Block with ID 6c1c3bb4-e218-4f00-aaf5-40606852d286 not found',
|
||||
))).toBe(true)
|
||||
@@ -196,6 +199,13 @@ describe('installRichEditorTransformErrorRecovery', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('recovers production table row index transactions reported as plain errors', () => {
|
||||
expectDocumentRepairRecovery(
|
||||
new Error('Index 1 out of range for <tableRow(tableCell(tableParagraph("A")))>'),
|
||||
'table_position_out_of_range',
|
||||
)
|
||||
})
|
||||
|
||||
it('recovers invalid insertion-depth transactions after note switching and saves', () => {
|
||||
expectDocumentRepairRecovery(
|
||||
new RangeError('Inserted content deeper than insertion position'),
|
||||
|
||||
Reference in New Issue
Block a user