From 2f21fd96b1a68f8bff445fe6c7614caf453d90fc Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Sun, 22 May 2022 10:43:21 -0500 Subject: [PATCH] Catch non-arrays on summary numbers --- helpers/get-list-summary-numbers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helpers/get-list-summary-numbers.js b/helpers/get-list-summary-numbers.js index 444244b..7e545e1 100644 --- a/helpers/get-list-summary-numbers.js +++ b/helpers/get-list-summary-numbers.js @@ -1,6 +1,9 @@ import statuses from '~/helpers/statuses' export default function ( appList ) { + if ( !Array.isArray( appList ) ) { + throw new Error(`List must be an array but is ${typeof appList}`) + } const totalApps = appList.length