Skip to content

Commit

Permalink
fix null variable in state
Browse files Browse the repository at this point in the history
Summary:
Fix "Cannot read property 'monitoring' of null" in CPU plugin.

{F132280986}

Reviewed By: danielbuechele

Differential Revision: D8800114

fbshipit-source-id: c363eda71e4d580fdd12ff1dc3981feaaafeae93
  • Loading branch information
Barney Huang authored and facebook-github-bot committed Jul 11, 2018
1 parent c50b286 commit c048e03
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/device-plugins/cpu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ export default class CPUFrequencyTable extends SonarDevicePlugin<CPUState> {
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
Expand Down

0 comments on commit c048e03

Please sign in to comment.