Reputation: 353
Babel is replacing this
with void 0
how can I prevent this behavior?
I have this code:
((parent)=>{
parent.something = {}
})(this)
With babel it renders like
(function (parent) {
parent.something = {}
})(void 0);
I need this
(function (parent) {
parent.something = {}
})(this);
I know that I can use self
but this is not the same in all cases
Upvotes: 4
Views: 967