0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 16:12:37 +00:00

Add guard clause for history UI items

This commit is contained in:
G.Ambatte
2024-09-14 23:43:26 +12:00
parent a7cf49557a
commit 7ec2558eef

View File

@@ -153,6 +153,8 @@ const Snippetbar = createClass({
return <div className='dropdown'>
{_.map(historyItems, (item, index)=>{
if(!item.savedAt) return;
const saveTime = new Date(item.savedAt);
const diffTime = new Date() - saveTime;
const diffMins = Math.floor(diffTime / (60 * 1000));