Skip to content

Commit

Permalink
fix: 0 speed when no speed data returned
Browse files Browse the repository at this point in the history
  • Loading branch information
WDaan committed Apr 5, 2021
1 parent 53c548b commit a7b8ed9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/models/Status.js
Expand Up @@ -16,12 +16,12 @@ export default class Status {
this.status = connection_status || previous.status
this.downloaded = dl_info_data || previous.downloaded
this.uploaded = up_info_data || previous.uploaded
this.dlspeed = dl_info_speed || previous.dlspeed
this.upspeed = up_info_speed || previous.upspeed
this.dlspeed = dl_info_speed || 0
this.upspeed = up_info_speed || 0
this.freeDiskSpace = free_space_on_disk || previous.freeDiskSpace
this.altSpeed = use_alt_speed_limits || previous.altSpeed
this.dlspeedRaw = this.formatSpeed(dl_info_speed) || previous.dlspeedRaw
this.upspeedRaw = this.formatSpeed(up_info_speed) || previous.upspeedRaw
this.dlspeedRaw = this.formatSpeed(dl_info_speed) || 0
this.upspeedRaw = this.formatSpeed(up_info_speed) || 0
Object.freeze(this)

}
Expand Down

0 comments on commit a7b8ed9

Please sign in to comment.