I know there are questions that look like this one but my context looks much simpler and strange:
I have this object:
const obj = {
fn: () => {
console.log('obj', this);
}
}
obj.fn();
And it's logging Window
object instead on obj
.
It never happened to me before, looks so strange, has there been any change in ECMAScript and arrow functions in the last months? Guessing not but you never know... Makes no sense to me but I may be missing something...