hotfix: crash when moving an item to trash

This should probably be investigated more and fixed properly. Seems like a core issue to me.
This commit is contained in:
thecodrr
2020-04-21 12:01:15 +05:00
parent 84ba34955d
commit 9094da0805

View File

@@ -162,6 +162,8 @@ function Note(props) {
export default React.memo(Note, function (prevProps, nextProps) {
const prevItem = prevProps.item;
const nextItem = nextProps.item;
// TODO need to investigate why a crash happens here.
if (!prevItem || !nextItem) return true;
return (
prevItem.pinned === nextItem.pinned &&
prevItem.favorite === nextItem.favorite &&