Skip to content

Commit

Permalink
fix: build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisi Linhart committed Dec 15, 2023
1 parent 0431f87 commit ce7b9e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import prompts from '../lib/prompts'
import frameworks from '../lib/frameworks'
import clone from '../lib/clone'
import replace from '../lib/replace'
import regions, {Region} from '../lib/regions'
import regions from '../lib/regions'
import {addCustomParentFramework} from '../lib/helper-replace'

export default class CreateStoryblokAppCommand extends Command {
Expand Down Expand Up @@ -89,11 +89,11 @@ export default class CreateStoryblokAppCommand extends Command {

// region
const spaceRegion: string = flags?.region || region // EU , US or CN
let selectedRegion: Region | undefined
let selectedRegion = regions.EU
const possibleRegionValues = Object.values(regions).map(r => r.value)
const isValidRegion = possibleRegionValues.includes(spaceRegion)
if (isValidRegion) {
selectedRegion = Object.values(regions).find(r => r.value === spaceRegion)
selectedRegion = Object.values(regions).find(r => r.value === spaceRegion) ?? regions.EU
} else {
throw new Error(`Please provide a valid region via '-r' parameter : ${possibleRegionValues.join(', ')}`)
}
Expand Down

0 comments on commit ce7b9e1

Please sign in to comment.