Skip to content

Commit

Permalink
fixup! Simplify PLATFORM environ variable validation
Browse files Browse the repository at this point in the history
  • Loading branch information
FirelightFlagboy committed Oct 16, 2024
1 parent 466d2de commit 6476e90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (process.env.PARSEC_APP_TEST_MODE || process.env.APP_TEST_MODE) {
if (process.env.PLATFORM !== undefined) {
console.log(`PLATFORM environ set to \`${process.env.PLATFORM}\``);
const VALID_PLATFORMS = ['web', 'native'];
if (process.env.PLATFORM in VALID_PLATFORMS) {
if (VALID_PLATFORMS.includes(process.env.PLATFORM)) {
platform = process.env.PLATFORM;
} else {
throw new Error(`Invalid value for PLATFORM environ variable, accepted values: ${VALID_PLATFORMS.join(', ')}`);
Expand Down

0 comments on commit 6476e90

Please sign in to comment.