Egge on Nostr: Because I received a coupe of DMs pointing out a bug in this code: in JavaScript ...
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.
nevent1q…q7px
Published at
2025-02-18 08:13:54Event JSON
{
"id": "8513d9c73e6aff031f9bf091392314b925b775e145499c9d44290ad9fc44b1e8",
"pubkey": "ddf03aca85ade039e6742d5bef3df352df199d0d31e22b9858e7eda85cb3bbbe",
"created_at": 1739866434,
"kind": 1,
"tags": [],
"content": "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).\n\nThere is no bug in this code. ecash fixes it globally. \n\nnostr:nevent1qqsd8sjyp3d3c3d6rqm8h327ctkldx0upd5lvxkmq6knygztw8fa40gpr9mhxue69uhkummnw3ezucm9wf3kzarjdamxztndv5xrgfwl",
"sig": "4c623f41c885b7f094e1f0bde624e6754b81c6c0e766d3219979d8d61163b3f7e581a78548bf55ec1abe8d71e9b45943deda07013d8df2f3be3ea229c205f799"
}