From 6402370eafb7142af12448ba44cdb6a8390317ad Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Wed, 8 May 2019 06:44:14 +0200 Subject: [PATCH] Don't compute nfp mucus value when data missing --- lib/nfp-mucus.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/nfp-mucus.js b/lib/nfp-mucus.js index 27e1590..1a8e8a9 100644 --- a/lib/nfp-mucus.js +++ b/lib/nfp-mucus.js @@ -1,4 +1,7 @@ export default function (feeling, texture) { + + if (typeof feeling != 'number' || typeof texture != 'number') return null + const feelingMapping = { 0: 0, 1: 1,