Skip to content

Commit

Permalink
catch invalid setupArgs in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
shatfield4 committed Sep 9, 2024
1 parent 6ca6a5b commit c9d3477
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import { sentenceCase } from "text-case";
* @returns {object} - The inputs object
*/
function inputsFromArgs(setupArgs) {
if (!setupArgs || typeof setupArgs !== "object") {
if (
!setupArgs ||
setupArgs.constructor?.call?.().toString() !== "[object Object]"
) {
return {};
}
return Object.entries(setupArgs).reduce(
Expand Down

0 comments on commit c9d3477

Please sign in to comment.