nsfw-filter
nsfw-filter copied to clipboard
fix: bug with conditional
Existing isSafe does not get triggered as an or condition if either is undefined due to the following code:
if (!pornPrediction || !hentaiPrediction) {
return true;
}
The PR fixes this logic so that when either pornPrediction < 0.25
or hentaiPrediction < 0.25
, isSafe returns false.