daf-data-store
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -59,3 +59,7 @@ "use strict"; | ||
switch (_c.label) { | ||
case 0: return [4 /*yield*/, dataStore.findMessages({ threadId: message.threadId })]; | ||
case 0: | ||
if (!message.threadId) { | ||
return [2 /*return*/, []]; | ||
} | ||
return [4 /*yield*/, dataStore.findMessages({ threadId: message.threadId })]; | ||
case 1: | ||
@@ -62,0 +66,0 @@ messages = _c.sent(); |
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.3.3](https://github.com/uport-project/daf/compare/v1.3.2...v1.3.3) (2019-12-20) | ||
### Bug Fixes | ||
* Return empty array for empty threads ([fdb1e54](https://github.com/uport-project/daf/commit/fdb1e54fbd43657dd42180926cc160da7245db31)) | ||
## [1.3.2](https://github.com/uport-project/daf/compare/v1.3.1...v1.3.2) (2019-12-20) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "daf-data-store", | ||
"description": "DID Agent Framework Data Store", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"main": "build/index.js", | ||
@@ -12,3 +12,3 @@ "types": "build/index.d.ts", | ||
"blakejs": "^1.1.0", | ||
"daf-core": "^1.3.2", | ||
"daf-core": "^1.3.3", | ||
"debug": "^4.1.1", | ||
@@ -31,3 +31,3 @@ "sql-bricks-sqlite": "^0.1.0" | ||
"keywords": [], | ||
"gitHead": "5e973edf8e625cbeff16cff36782cbc003479d82" | ||
"gitHead": "3109c4aa4763f6322a6db150e5c1c71ffb27bd42" | ||
} |
@@ -12,2 +12,5 @@ import { DataStore } from './data-store' | ||
thread: async (message: any, {}, { dataStore }: Context) => { | ||
if (!message.threadId) { | ||
return [] | ||
} | ||
const messages = await dataStore.findMessages({ threadId: message.threadId }) | ||
@@ -14,0 +17,0 @@ return messages.filter((item: any) => item.id !== message.id) |
Sorry, the diff of this file is not supported yet
140112
2205
Updateddaf-core@^1.3.3