tfobz / carbon-calculator

Carbon Footprint Calculator
https://tfobz.github.io/carbon-calculator/
Other
5 stars 3 forks source link

Prevent negative numbers #35

Closed Benji377 closed 1 year ago

Benji377 commented 1 year ago

Describe the bug In the emission module, negative values can be inserted. This might work for when you produce energy, but doesn't work for cars or pizza, for example.

To Reproduce Steps to reproduce the behaviour:

  1. Open the website
  2. Click on "+" icon to create a new entry
  3. Click on the entry and add a new module
  4. Click on the module and enter a negative number

Expected behaviour Entering negative numbers should be prevented somehow, or only allowed in special cases

Screenshots image