Skip to content

Commit

Permalink
fix: check for undefined "compilerOptions" property (#108)
Browse files Browse the repository at this point in the history
Co-authored-by: Alec Larson <[email protected]>

Closes #93
  • Loading branch information
igordreher authored Apr 10, 2023
1 parent 3b7f3c6 commit 7ac675a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default (opts: PluginOptions = {}): Plugin => {
files?: string[]
include?: string[]
exclude?: string[]
compilerOptions: CompilerOptions
compilerOptions?: CompilerOptions
}

debug('config loaded:', inspect({ configPath, config }, false, 10, true))
Expand All @@ -167,7 +167,7 @@ export default (opts: PluginOptions = {}): Plugin => {
return null
}

const options = config.compilerOptions
const options = config.compilerOptions || {}
const { baseUrl, paths } = options
if (!baseUrl && !paths) {
debug(`[!] missing baseUrl and paths: "${configPath}"`)
Expand Down

0 comments on commit 7ac675a

Please sign in to comment.