score:0

Maybe you are using 'use strict'? In strict mode, the value of this remains as undefined, as explained in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this#function_context. If selectedSensor is defined as a global variable, use the global object (window in a browser) instead of this.


Related Query

More Query from same tag