Closed mtsknn closed 3 years ago
@sylvainjule As I haven’t replied yet. I currently don’t have time for digging into that. Please just merge, if you think it’s fine.
Thanks a lot @mtsknn! 🍻 And apologies for the delay. Solves it for me, I refactored a few things so I added the fix by hand.
Fixes #62.
About line 141:
The original condition is always false because the code is minified when running
npm run build
and function names are thus not preserved.Now
state.f
and thelocal
function are compared directly, and it should work. (Andstate.f &&
is no longer necessary).Side note: since I'm unfamiliar with the code base, I was at first confused what
state.f
is and wondered "why does this have a cryptic one-letter name?!" But okay, it's apparently a function, so I can see why it's named as justf
. However, I think thatstate.fn
would be clearer (I'd argue that "fn" is more common abbreviation of "function" than "f" is), and it would still be very succinct.The changes on line 1037 and onwards are the same as the changes made by @fabianmichael (cheers!) in #62.
@fabianmichael, as you have apparently worked on this issue earlier, would you mind taking a look at this PR? 😊