nsfw-filter icon indicating copy to clipboard operation
nsfw-filter copied to clipboard

fix: bug with conditional

Open suhjohn opened this issue 1 year ago • 0 comments

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.

suhjohn avatar Oct 21 '23 03:10 suhjohn