user 6 년 전
부모
커밋
dd543c61b9
3개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  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);

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 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);