Skip to content

Commit 4811011

Browse files
committed
fix(tsc): initialize extensionsChangedException correctly in run function
1 parent 3b82afe commit 4811011

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/tsc/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const windowsPathReg = /\\/g;
66
export function run(tscPath = require.resolve('typescript/lib/tsc')) {
77

88
let runExtensions = ['.vue'];
9+
let extensionsChangedException: Error | undefined;
910

10-
const extensionsChangedException = new Error('extensions changed');
1111
const main = () => runTsc(
1212
tscPath,
1313
runExtensions,
@@ -31,7 +31,7 @@ export function run(tscPath = require.resolve('typescript/lib/tsc')) {
3131
}
3232
else {
3333
runExtensions = allExtensions;
34-
throw extensionsChangedException;
34+
throw extensionsChangedException = new Error('extensions changed');
3535
}
3636
}
3737
);

0 commit comments

Comments
 (0)