You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regarding conversion to class... I'm not really sure. This new function(){} is a pretty rare pattern. Hard to tell if the user really had a class in mind or not. I've seen people unfamiliar with JavaScript writing new function(){} thinking it'll create a new function.
I'd expect your code doesn't contain lots of these new function calls... so it's only a tiny task for you to convert them manually.
The result is kinda silly as the new will have no effect in here. But neither did it in the original code. So that's more in the area of garbage-in, garbage-out. Probably not worth a fix.
Hmm... that will actually result in syntax error as you can't use new with arrow functions. So maybe it would be worth of a fix... though perhaps the error will help out the user in spotting this seriously flawed piece of code.
converts to
Would not this one
be better?
The text was updated successfully, but these errors were encountered: