Skip to content

Commit

Permalink
fix(announce/size): ignores erroneous size being used ("0") (cross-se…
Browse files Browse the repository at this point in the history
…ed#561)

addresses potential problems when size is not provided in announce,
which in autobrr results in "0" being provided as a size.

result is an automatic size mismatch, when it could/should otherwise be
discarded as erroneous
  • Loading branch information
zakkarry authored Dec 11, 2023
1 parent b0542cb commit f498164
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/decide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async function assessCandidateHelper(
): Promise<ResultAssessment> {
const { matchMode } = getRuntimeConfig();

if (size != null && !sizeDoesMatch(size, searchee)) {
if (size && !sizeDoesMatch(size, searchee)) {
return { decision: Decision.SIZE_MISMATCH };
}

Expand Down

0 comments on commit f498164

Please sign in to comment.