fix: comparing against a missing value
If a new package was added, the action would fail as it would try to subtract `null` from an integer. Instead default to `0`.
This commit is contained in:
parent
763e139836
commit
1ec7c2a0df
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# Where .[0] is the new value, and .[1] is the old value
|
||||
def calc_change($key):
|
||||
. as $input | $input[0][$key] - $input[1][$key];
|
||||
. as $input | ($input[0][$key] // 0) - ($input[1][$key] // 0);
|
||||
|
||||
# Calculate the change in percentage for multiple keys
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue