Skip to content
Snippets Groups Projects
Commit a9951160 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Fix Math.trunc override, to return an integer instead of a string

parent 92d62b0a
No related branches found
No related tags found
No related merge requests found
......@@ -439,7 +439,7 @@ if (typeof String.prototype.trim !== 'function') {
if (Math && typeof Math.trunc !== 'function') {
console.debug("Adding Math.trunc() -> was missing on this platform");
Math.trunc = function(number) {
return (number - 0.5).toFixed();
return parseInt((number - 0.5).toFixed());
};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment