File tree Expand file tree Collapse file tree
browser-localstorage-demo Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -475,7 +475,11 @@ <h2>🖥️ Console Output</h2>
475475 ${ task . title }
476476 </div>
477477 <div class="task-meta">
478- ID: ${ task . id } | Created: ${ new Date ( task . created_at ) . toLocaleString ( ) }
478+ ID: ${ task . id } | Created: ${
479+ task . created_at && ! isNaN ( new Date ( task . created_at ) . getTime ( ) )
480+ ? new Date ( task . created_at ) . toLocaleString ( )
481+ : 'Unknown'
482+ }
479483 </div>
480484 </div>
481485 <div class="task-actions">
Original file line number Diff line number Diff line change @@ -314,7 +314,11 @@ <h2>🖥️ Console Output</h2>
314314 <div>
315315 <strong>${ note . content } </strong>
316316 <div style="font-size: 0.85em; color: #666; margin-top: 5px;">
317- Created: ${ new Date ( note . created_at ) . toLocaleString ( ) }
317+ Created: ${
318+ note . created_at && ! isNaN ( new Date ( note . created_at ) . getTime ( ) )
319+ ? new Date ( note . created_at ) . toLocaleString ( )
320+ : 'Unknown'
321+ }
318322 </div>
319323 </div>
320324 <button class="danger" onclick="deleteNote('${ note . id } ')">🗑</button>
You can’t perform that action at this time.
0 commit comments