Skip to content

Commit

Permalink
fix(emoji-size-in-chat): Added radix to parseInt
Browse files Browse the repository at this point in the history
  • Loading branch information
mananjadhav committed Sep 11, 2021
1 parent 22ca1d7 commit 52d9827
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libs/EmojiUtils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint radix: ["error", "as-needed"] */
import _ from 'underscore';
import CONST from '../CONST';

Expand All @@ -13,7 +12,7 @@ function getEmojiUnicode(input) {
}

if (input.length === 1) {
return _.map(input.charCodeAt(0).toString().split(' '), val => parseInt(val).toString(16)).join(' ');
return _.map(input.charCodeAt(0).toString().split(' '), val => parseInt(val, 10).toString(16)).join(' ');
}

const pairs = [];
Expand All @@ -37,7 +36,7 @@ function getEmojiUnicode(input) {
pairs.push(input.charCodeAt(i));
}
}
return _.map(pairs, val => parseInt(val).toString(16)).join(' ');
return _.map(pairs, val => parseInt(val, 10).toString(16)).join(' ');
}

/**
Expand Down

0 comments on commit 52d9827

Please sign in to comment.