Commit 56ea425c authored by Mikaël Salson's avatar Mikaël Salson
Browse files

segmenter.js: string cannot be NaN

At this point identity is a string, which cannot be NaN.
Therefore we start by converting the value to a float and
then we test whether is it NaN or not.
parent beb58e6e
......@@ -572,8 +572,8 @@ Segment.prototype = {
identity = clone.seg.imgt["V-REGION identity % (with ins/del events)"]
if (identity.length == 0)
identity = clone.seg.imgt["V-REGION identity %"]
if (identity != NaN) {
var identityRate = parseFloat(identity)
if (identityRate != NaN) {
info = document.createElement('span');
if (V_IDENTITY_THRESHOLD)
info.className += identityRate < V_IDENTITY_THRESHOLD ? ' identityGood' : ' identityBad'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment