diff --git a/lib/formatDate.js b/lib/formatDate.js index 8be365fc..5674b170 100644 --- a/lib/formatDate.js +++ b/lib/formatDate.js @@ -5,6 +5,7 @@ * @returns {string} */ export default function formatDate (date, local) { + if (!date) return '' const d = new Date(date) const options = { year: 'numeric', month: 'short', day: 'numeric' } const res = d.toLocaleDateString(local, options)