Skip to content

Commit

Permalink
2.1.4 - Fix - 修复devicex模块this空指针问题
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperMonster003 committed Jun 25, 2021
1 parent dbbae9b commit b5b3e43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ext-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ let ext = {
return this.isAcPlugged() || this.isUsbPlugged() || this.isWirelessPlugged();
},
isPluggedAndStayingOn() {
let _state = this.stay_on_while_plugged_in.get(true); // 0-7
let _state = devicex.stay_on_while_plugged_in.get(true); // 0-7
let _isOn = x => (x & _state) === x;
return this.isAcPlugged() && _isOn(BatteryManager.BATTERY_PLUGGED_AC)
|| this.isUsbPlugged() && _isOn(BatteryManager.BATTERY_PLUGGED_USB)
Expand Down

0 comments on commit b5b3e43

Please sign in to comment.