mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
8efc87f33a
Before this commit, the callback passed to `.map()` during attribute removal was a normal function, not an arrow function. This meant that the value of `this` in the function body depended on how the callback was invoked. In this case, the callback was invoked without any explicit context (it was not called as a method, nor was it called via `.call()`, `.apply()`, or `.bind()`). Without any explicit context, the value of `this` depends on strict mode. Currently the function is in sloppy mode, so `this` refers to the "global this" object (a.k.a., `window`). It doesn't make sense for the callback to reference `window.author`, so I'm assuming the previous behavior was a bug. Now the function is an arrow function, so the value of `this` comes from the enclosing lexical context, which in this case is the AttributeManager object. I believe that was the original intention. |
||
---|---|---|
.. | ||
locales | ||
node | ||
static | ||
templates | ||
ep.json | ||
etherpad_icon.svg | ||
package-lock.json | ||
package.json | ||
README.md | ||
tests | ||
web.config |
Ignore this file and see the file in the base installation folder