Skip to content

Commit

Permalink
Fix select collection for orphan prediction
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustem Mussabekov committed May 23, 2024
1 parent 52ac891 commit 56daf50
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
4 changes: 4 additions & 0 deletions src/co/bookmarks/item/view.module.styl
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@
* {
margin: 0
}

p + p {
margin-top: 1em;
}
}
}

Expand Down
25 changes: 13 additions & 12 deletions src/data/reducers/predictions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
}

Expand Down

0 comments on commit 56daf50

Please sign in to comment.