mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-07 22:52:39 +00:00
Add guard clause for history UI items
This commit is contained in:
@@ -153,6 +153,8 @@ const Snippetbar = createClass({
|
|||||||
|
|
||||||
return <div className='dropdown'>
|
return <div className='dropdown'>
|
||||||
{_.map(historyItems, (item, index)=>{
|
{_.map(historyItems, (item, index)=>{
|
||||||
|
if(!item.savedAt) return;
|
||||||
|
|
||||||
const saveTime = new Date(item.savedAt);
|
const saveTime = new Date(item.savedAt);
|
||||||
const diffTime = new Date() - saveTime;
|
const diffTime = new Date() - saveTime;
|
||||||
const diffMins = Math.floor(diffTime / (60 * 1000));
|
const diffMins = Math.floor(diffTime / (60 * 1000));
|
||||||
|
|||||||
Reference in New Issue
Block a user