Skip to content

Commit

Permalink
swap checkEnum logic ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyuan-linn committed Mar 5, 2024
1 parent 5548ba8 commit 06b3226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/handleOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ function handleModelName(
defaultValue,
ml5ModelName
) {
const modelName = checkEnum(userValue, possibleValues, true);
if (userValue === undefined) {
return defaultValue;
}

const modelName = checkEnum(userValue, possibleValues, true);
if (modelName === undefined) {
console.warn(
errorMessages.modelName(
Expand Down

0 comments on commit 06b3226

Please sign in to comment.