From 6d560b850708d3a19c6379a96e624b6a122e2290 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Mon, 13 Sep 2021 18:30:10 +1200 Subject: [PATCH] Null check view count --- utils/converters.js | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/converters.js b/utils/converters.js index 80358d8..84e4535 100644 --- a/utils/converters.js +++ b/utils/converters.js @@ -147,6 +147,7 @@ function tToMediaFragment(t) { } function viewCountToText(viewCount) { + if (typeof viewCount !== "number") return null return viewCount.toLocaleString("en-US") + " views" }