Refactor error name.
This commit is contained in:
parent
6009daccec
commit
baf6b9babc
@ -16,13 +16,13 @@ export function updateSyncable(
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
target[path[0]] = c.v;
|
target[path[0]] = c.v;
|
||||||
} catch (e) {
|
} catch (error) {
|
||||||
if (
|
if (
|
||||||
!e.message.includes(
|
!error.message.includes(
|
||||||
'Cannot assign an object that already belongs to an Automerge document.'
|
'Cannot assign an object that already belongs to an Automerge document.'
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
throw new Error(e);
|
throw new Error(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user