From 56daf50bdc49168f084319038268fc0be8ad1767 Mon Sep 17 00:00:00 2001 From: Rustem Mussabekov Date: Thu, 23 May 2024 18:02:31 +0300 Subject: [PATCH] Fix select collection for orphan prediction --- src/co/bookmarks/item/view.module.styl | 4 ++++ src/data/reducers/predictions.js | 25 +++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/co/bookmarks/item/view.module.styl b/src/co/bookmarks/item/view.module.styl index 1ab9e148..b7ae5475 100644 --- a/src/co/bookmarks/item/view.module.styl +++ b/src/co/bookmarks/item/view.module.styl @@ -145,6 +145,10 @@ * { margin: 0 } + + p + p { + margin-top: 1em; + } } } diff --git a/src/data/reducers/predictions.js b/src/data/reducers/predictions.js index bb76b6eb..59228e12 100644 --- a/src/data/reducers/predictions.js +++ b/src/data/reducers/predictions.js @@ -43,18 +43,19 @@ export default function(state = initialState, action){switch (action.type) { const { _id, ...props } = action return state - .set('items', state.items - .map(item=>{ - if (item._id != _id) - return item - - let patched = item - for(const key in props) - if (typeof item[key] != 'undefined') - patched = patched.set(key, props[key]) - return patched - }) - .filter(item=>item.raindropRefs ? item.raindropRefs.length : true) + .set('items', + state.items + .map(item=>{ + if (item._id != _id) + return item + + let patched = item + for(const key in props) + if (key != 'type') + patched = patched.set(key, props[key]) + return patched + }) + .filter(item=>item.raindropRefs ? item.raindropRefs.length : true) ) }