Global Feed Post Login
Replying to Avatar Egge

Because I received a coupe of DMs pointing out a bug in this code: in JavaScript “this” is implicitly defined in every function scope. If there is no object attached (function is not a method) it points to the global object (window or globalThis).

There is no bug in this code. ecash fixes it globally.

nostr:nevent1qqsd8sjyp3d3c3d6rqm8h327ctkldx0upd5lvxkmq6knygztw8fa40gpr9mhxue69uhkummnw3ezucm9wf3kzarjdamxztndv5xrgfwl

Avatar
eko 10mo ago

Indeed, there is no error. But keep in mind that when you use arrow functions there will be no implicit `this` available.

nostr:note1s5fan3e7dtlsx8um7zgnjgc5hyjmwa0pg4yee82y9y9dnlzyk85qaarhsc

Reply to this note

Please Login to reply.

Discussion

No replies yet.