Skip to content
This repository has been archived by the owner on Jul 9, 2019. It is now read-only.

Commit

Permalink
🐛 Don't create new empty objects while converting longs
Browse files Browse the repository at this point in the history
  • Loading branch information
cyraxx committed Aug 17, 2016
1 parent e16ae82 commit d81e505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pogobuf/pogobuf.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ module.exports = {
* @static
*/
convertLongs: function(object) {
if (!object || typeof object !== 'object') return new Object();
if (!object || typeof object !== 'object') return object;

if (Long.isLong(object)) {
return object.lessThanOrEqual(Number.MAX_SAFE_INTEGER) && object.greaterThanOrEqual(Number.MIN_SAFE_INTEGER) ?
Expand Down

0 comments on commit d81e505

Please sign in to comment.