From 0e9d686b6165e671a05be0512a3aca2535d025c5 Mon Sep 17 00:00:00 2001 From: sanderpost Date: Fri, 19 Jan 2018 11:43:37 +0100 Subject: [PATCH] fix: requesting non-existing post now returns empty object as expected --- api-server/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-server/posts.js b/api-server/posts.js index 517617bf4f..751c364c43 100644 --- a/api-server/posts.js +++ b/api-server/posts.js @@ -48,7 +48,7 @@ function get (token, id) { return new Promise((res) => { const posts = getData(token) res( - posts[id].deleted + !posts[id] || posts[id].deleted ? {} : posts[id] )