Skip to content

Commit

Permalink
Changed integer check to be cross browser compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob McVey committed Apr 21, 2015
1 parent eb6b70f commit d0bf384
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion egg.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Egg.prototype.__toCharCodes = function(keys) {

var characterKeyCodes = keys.map(function(key) {
// check if it's already a keycode
if(Number.isInteger(parseInt(key, 10))) {
if(key === parseInt(key, 10)) {
return key;
}

Expand Down
2 changes: 1 addition & 1 deletion egg.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0bf384

Please sign in to comment.