user 6 gadi atpakaļ
vecāks
revīzija
dd543c61b9
3 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 2 1
      lib/index.js
  2. 1 1
      lib/index.js.map
  3. 2 1
      src/index.ts

+ 2 - 1
lib/index.js

@@ -281,9 +281,10 @@ class BankClient {
             if (!existing) {
                 throw new Error('missing contact with id ' + contactId);
             }
+            const existingData = existing.getData();
             const newProps = util_1.mergeDeep({}, newProperties);
             delete newProps.id;
-            const newItem = util_1.mergeDeep(existing, newProps);
+            const newItem = util_1.mergeDeep(existingData, newProps);
             delete newItem.hash;
             const newItemHash = yield this.uploadSlimJSON(newItem);
             yield this.appendPrivate(peerId, '📇', newItemHash, existing.hash);

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 1
lib/index.js.map


+ 2 - 1
src/index.ts

@@ -272,9 +272,10 @@ export class BankClient {
       if (!existing) {
         throw new Error('missing contact with id ' + contactId);
       }
+      const existingData = existing.getData();
       const newProps: any = mergeDeep({}, newProperties);
       delete newProps.id;
-      const newItem: any = mergeDeep(existing, newProps);
+      const newItem: any = mergeDeep(existingData, newProps);
       delete newItem.hash;
       const newItemHash = await this.uploadSlimJSON(newItem);
       await this.appendPrivate(peerId, '📇', newItemHash, existing.hash);