Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
make sure to only parse numer or strings to intergers
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Feb 3, 2015
1 parent d8a4270 commit 9ec028b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/browser/startAnalyzing.js
Expand Up @@ -41,7 +41,11 @@ module.exports = function(_, pcSelectorMethod, interval) {
* sanitize stat values
*/
function sanitize(val) {
return parseInt(val || 0, 10);
if(typeof val !== 'string' && typeof val !== 'number') {
return undefined;
}

return parseInt(val, 10);
}

/**
Expand Down

0 comments on commit 9ec028b

Please sign in to comment.