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