diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-10-27 23:19:27 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 13:19:27 +0100 |
commit | 5af1dcfe292eb5f8cb60e72cf8f532596739b7fc (patch) | |
tree | 17bc2cb4710cb90a81916cdc13353c56607a78df /cli/tsc | |
parent | 30f3b831d31ec47e7d120bcd34194b7b69e6f716 (diff) |
fix(cli): do not throw on empty typescript files (#8143)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/99_main_compiler.js | 5 |
1 files changed, 4 insertions, 1 deletions
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, |