Skip to content

Commit

Permalink
Fixed issue #11731: Regexp validation for short-text question
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Oct 14, 2016
1 parent 9d18c35 commit 2748c25
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/expressions/em_javascript.js
Expand Up @@ -750,8 +750,14 @@ function LEMval(alias)
return value;
}
else {
var decimal_safe = new Decimal(value);
return parseFloat(decimal_safe.valueOf());
// If it's not a decimal number, just return value
try {
var decimal_safe = new Decimal(value);
return parseFloat(decimal_safe.valueOf());
}
catch (ex) {
return value;
}
}
}
case 'rowdivid':
Expand Down

0 comments on commit 2748c25

Please sign in to comment.