Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit 25aa6fb

Browse files
committed
fix: defensive check for options, fixes: #377
1 parent 02938eb commit 25aa6fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function compiler(loader: Loader, text: string): void {
3939

4040
const rootCompiler = getRootCompiler(loader._compiler);
4141

42-
const query = <QueryOptions>loaderUtils.getOptions(loader);
42+
const query = <QueryOptions>(loaderUtils.getOptions(loader) || {});
4343
const options = (loader.options && loader.options.ts) || {};
4444
const instanceName = query.instance || 'at-loader';
4545
const instance = ensureInstance(loader, query, options, instanceName, rootCompiler);

0 commit comments

Comments
 (0)