Array helpers.forEach was causing errors that resulted in status 500 errors in runtime when passed undefined or null values. Added if (!Array.isArray(array)) return ''; as a fast-fail measure to it and other Array helpers to handle bad parameters without causing errors. This fast-fail was already being used on multiple other helpers in this file, and was copied and added to those which might error without it. Added if (!Array.isArray(array)) array = []; to helpers.filter which should produce the similar safe result as the fast-fail.
Array helpers.forEach was causing errors that resulted in status 500 errors in runtime when passed undefined or null values. Added
if (!Array.isArray(array)) return '';
as a fast-fail measure to it and other Array helpers to handle bad parameters without causing errors. This fast-fail was already being used on multiple other helpers in this file, and was copied and added to those which might error without it. Addedif (!Array.isArray(array)) array = [];
to helpers.filter which should produce the similar safe result as the fast-fail.