Fix error when JS is executed with --recompile (#2007)

test case from @afinch7
This commit is contained in:
Ryan Dahl 2019-03-27 16:10:31 -04:00 committed by GitHub
parent 8c770c5a90
commit d0b6152f11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View file

@ -184,9 +184,8 @@ fn fetch_module_meta_data_and_maybe_compile_async(
.dir
.fetch_module_meta_data_async(&specifier, &referrer)
.and_then(move |mut out| {
if (out.media_type == msg::MediaType::TypeScript
&& out.maybe_output_code.is_none())
|| state_.flags.recompile
if out.media_type == msg::MediaType::TypeScript
&& (out.maybe_output_code.is_none() || state_.flags.recompile)
{
debug!(">>>>> compile_sync START");
out = compile_sync(state_.clone(), &specifier, &referrer, &out);