Skip to content

Commit

Permalink
fix: Fix the mapping error (x is undefined) in the detail view
Browse files Browse the repository at this point in the history
  • Loading branch information
john-ghatas committed May 7, 2020
1 parent 2a87b58 commit c0156ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/public/views/Logs/Details/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import PostBox from '../../../components/Post/index.js';
const logDetailScreen = (model) => {
const data = model.logs.getData();

if (data) {
if (data && data.length !== 0) {
const id = parseInt(model.router.params.id);
const log = data.find((entry) => entry && entry.entryID === id);
return h('.w-100.flex-column', [log.content.map((post, index) => h('.w-100', PostBox(post, index + 1)))]);
Expand Down

0 comments on commit c0156ef

Please sign in to comment.