From d67dca60fc88b0a0e173d81a582be9d6b2bb068e Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Thu, 17 Dec 2020 03:43:09 +0100 Subject: [PATCH] Fixed birthdate interpolation and query. --- assets/js/actors/actions.js | 2 ++ src/actors.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/actors/actions.js b/assets/js/actors/actions.js index 6feea6b1..897a3903 100644 --- a/assets/js/actors/actions.js +++ b/assets/js/actors/actions.js @@ -40,6 +40,7 @@ function initActorActions(store, router) { dateOfBirth dateOfDeath age + dateOfBirth ageFromBirth ageAtDeath ethnicity @@ -280,6 +281,7 @@ function initActorActions(store, router) { name slug age + dateOfBirth ageFromBirth ageAtDeath dateOfBirth diff --git a/src/actors.js b/src/actors.js index 66fab79b..e4566b56 100644 --- a/src/actors.js +++ b/src/actors.js @@ -107,7 +107,7 @@ function getMostFrequentDate(dates) { } function getHighest(items) { - return items.reduce((prevItem, item) => (item > prevItem ? item : prevItem), 0); + return items.reduce((prevItem, item) => (item > prevItem ? item : prevItem), null); } function getLongest(items) {