Closed nblackburn closed 7 years ago
It was in scope (note var
there). With this change, we set code
to DEPS_RESOLVE_FAILED
on any error (for example, SyntaxError
in module), not just when resolve actually failed.
@shvaikalesh It's not in scope unless data is true which it wasn't in my particular edge case so i moved it outside so it's always available, fixing the error.
@nblackburn var
s are function-scoped, so if data
was falsy error.code = undefined
would happen, without any error.
@shvaikalesh Except it throws an error so i fixed it.
@nblackburn there is no possible way it can throw per spec. I believe you've got an error before this commit: https://github.com/brunch/deppack/commit/399f0f8f419ea8955787d87043fabf6eb7bfaecd
@shvaikalesh Yes, that is correct. Never even saw this commit but now it makes sense.
Halfway there but you forgot about the code variable not being defined.