Refactor error name.

This commit is contained in:
Spencer Ofwiti 2021-06-15 19:18:58 +03:00
parent 6009daccec
commit baf6b9babc

View File

@ -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);
} }
} }
}); });