Tobie,
If that's so, then we should explictly forbid memo not being an object,
shoudln't we? Or at least make this crystal-clear in the docs. The
current docs only state "memo: metadata for the event."
Otherwise, you can pull my commit b1bfdd5, fresh off the current main
master :-)
Le 26
The reason for this design choice was to avoid the following
altogether:
if (event.memo) {
foo = event.memo.foo;
}
and allow this instead:
foo = event.memo.foo;
There are memory costs involved with this design choice, but these can
easily be mitigated by passing in a value to
Hey Cédric,
Hmmm, I'd have to double-check the codebase for justification of this
defaults, but even if it turns out to be useful, the implementation
seems clearly faulty. It should go something like:
event.memo = (undefined === memo ? {} : memo);
Thanks for the heads up.
--
Christophe Por