Skip to content

Commit

Permalink
Don't call path.dirname with null/undefined
Browse files Browse the repository at this point in the history
Node 6+ enforces the parameter to path.dirname to be a string (nodejs/node@08085c4). The empty string results in the previous behavior.
  • Loading branch information
Blechhirn committed May 19, 2016
1 parent 5324491 commit a4f8353
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): {
configParseResult = (<TSCompatibleCompiler><any>compiler).parseJsonConfigFileContent(
configFile.config,
compiler.sys,
path.dirname(configFilePath)
path.dirname(configFilePath || '')
);
} else {
configParseResult = (<TSCompatibleCompiler><any>compiler).parseConfigFile(
configFile.config,
compiler.sys,
path.dirname(configFilePath)
path.dirname(configFilePath || '')
);
}

Expand Down

0 comments on commit a4f8353

Please sign in to comment.