From 5af1dcfe292eb5f8cb60e72cf8f532596739b7fc Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Tue, 27 Oct 2020 23:19:27 +1100 Subject: fix(cli): do not throw on empty typescript files (#8143) Co-authored-by: Luca Casonato Co-authored-by: Ryan Dahl --- cli/tsc/99_main_compiler.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cli/tsc') diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 470c1fcee..1248bad5a 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -374,7 +374,10 @@ delete Object.prototype.__proto__; "op_load", { specifier }, ); - assert(data, `"data" is unexpectedly null for "${specifier}".`); + assert( + data != null, + `"data" is unexpectedly null for "${specifier}".`, + ); sourceFile = ts.createSourceFile( specifier, data, -- cgit v1.2.3