diff --git a/src/device-plugins/cpu/index.js b/src/device-plugins/cpu/index.js index 5d0f83e48fd..4cf679852de 100644 --- a/src/device-plugins/cpu/index.js +++ b/src/device-plugins/cpu/index.js @@ -104,13 +104,13 @@ export default class CPUFrequencyTable extends SonarDevicePlugin { intervalID: ?IntervalID; device: AndroidDevice; - init() { - this.setState({ - cpuFreq: [], - cpuCount: 0, - monitoring: false, - }); + state = { + cpuFreq: [], + cpuCount: 0, + monitoring: false, + }; + init() { this.adbClient = this.device.adb; // check how many cores we have on this device