Should be changed to function(){} because "this" points to global scope, not function scope in arrow functions. In this case use function(){} instead