Fix prop validation in ConfidenceTag
While reviewing !1388 (merged), I noticed that some unrelated Vue warnings were displayed:
It turns out the prop validator in the ConfidenceTag
component used a statement that would never be true; a number is not an instance of Number
because JavaScript is JavaScript, so number instanceof Number
is false. Removing this statement causes TypeScript to cry because the value is not guaranteed to a number, so I changed the validator to use the correct type check, typeof value === 'number'
, which makes both JS and TS happy.
Those warnings would never have been caught by Sentry as they are only visible in dev, and they also have no effect at all on the working condition of the frontend; the confidences are still working perfectly fine.