From baf6b9babc9ef9ce5c452fa97fc4f3d133547fa2 Mon Sep 17 00:00:00 2001 From: Spencer Ofwiti Date: Tue, 15 Jun 2021 19:18:58 +0300 Subject: [PATCH] Refactor error name. --- src/app/_helpers/sync.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/_helpers/sync.ts b/src/app/_helpers/sync.ts index 9a0840b..3942140 100644 --- a/src/app/_helpers/sync.ts +++ b/src/app/_helpers/sync.ts @@ -16,13 +16,13 @@ export function updateSyncable( } try { target[path[0]] = c.v; - } catch (e) { + } catch (error) { if ( - !e.message.includes( + !error.message.includes( 'Cannot assign an object that already belongs to an Automerge document.' ) ) { - throw new Error(e); + throw new Error(error); } } });