Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 253c9cb

Browse files
committed
Unpack payload when map fucntion is not available
1 parent 16b6137 commit 253c9cb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/orbitdb-api.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ class OrbitdbAPI extends Express {
147147
contents = await getraw(req,res, next)
148148
if (contents.map && contents.payload) {
149149
result = contents.map((e) => e.payload.value)
150+
} else if (contents.payload) {
151+
result = contents.payload.value
150152
} else {
151153
result = contents
152154
}

0 commit comments

Comments
 (0)