Skip to content

Commit

Permalink
refactor: remove undefined type casting from platformConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
hoonjoo-park committed Feb 8, 2024
1 parent 9d3e817 commit 55f2938
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import {supportedPlatforms} from '../../config/supportedPlatforms';
const createBuild =
({platformName}: BuilderCommand) =>
async (_: Array<string>, ctx: Config, args: BuildFlags) => {
const platformConfig = ctx.project[platformName] as
| IOSProjectConfig
| undefined;
const platformConfig = ctx.project[platformName] as IOSProjectConfig;

if (
platformConfig === undefined ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ const createRun =
async (_: Array<string>, ctx: Config, args: FlagsT) => {
// React Native docs assume platform is always ios/android
link.setPlatform('ios');
const platformConfig = ctx.project[platformName] as
| IOSProjectConfig
| undefined;
const platformConfig = ctx.project[platformName] as IOSProjectConfig;
const {sdkNames, readableName: platformReadableName} =
getPlatformInfo(platformName);

Expand Down

0 comments on commit 55f2938

Please sign in to comment.