WebThingsIO / gateway

WebThings Gateway - a self-hosted web application for monitoring and controlling a building over the web
http://webthings.io/gateway
Mozilla Public License 2.0
2.62k stars 339 forks source link

Bugfix for NaN issue #3072

Closed flatsiedatsie closed 1 year ago

flatsiedatsie commented 1 year ago

In some cases this led to an error. This fixes the NaN issues from the int becoming a string.

benfrancis commented 1 year ago

Thanks! As I understand it HTML attribute values are always read as strings, so presumably it needs casting to an integer on line 209 as well?

flatsiedatsie commented 1 year ago

Yeah that makes sense actually. Thanks!

codecov-commenter commented 1 year ago

Codecov Report

Merging #3072 (338d9d0) into master (c378371) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 338d9d0 differs from pull request most recent head d7eea8c. Consider uploading reports for the commit d7eea8c to get more accurate results

@@           Coverage Diff            @@
##           master    #3072    +/-   ##
========================================
  Coverage   65.57%   65.57%            
========================================
  Files         124      124            
  Lines        9307     9307            
  Branches     1712     1698    -14     
========================================
  Hits         6103     6103            
- Misses       2980     3203   +223     
+ Partials      224        1   -223     
Impacted Files Coverage Δ
src/db.ts 71.55% <0.00%> (ø)
src/app.ts 55.50% <0.00%> (ø)
src/utils.ts 60.86% <0.00%> (ø)
src/migrate.ts 54.74% <0.00%> (ø)
src/platform.ts 72.97% <0.00%> (ø)
src/wifi-setup.ts 11.57% <0.00%> (ø)
src/addon-utils.ts 83.76% <0.00%> (ø)
src/models/logs.ts 66.36% <0.00%> (ø)
src/models/group.ts 10.63% <0.00%> (ø)
src/models/thing.ts 71.08% <0.00%> (ø)
... and 35 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.