DEV: Provide radix argument to parseInt (#8281)

* DEV: Provide radix 10 argument to parseInt

* DEV: Provide radix 16 argument to parseInt

* DEV: Remove unnecessary parseInt calls

* Fix year formatting

parseInt was used here to convert decimals to ints
This commit is contained in:
Jarek Radosz
2019-11-12 10:47:42 +01:00
committed by GitHub
parent 69266f60ed
commit 5d4b240453
44 changed files with 77 additions and 79 deletions

View File

@@ -14,7 +14,7 @@ export default {
$(".lazyYT", $elem).lazyYT({
onPlay(e, $el) {
// don't cloak posts that have playing videos in them
const postId = parseInt($el.closest("article").data("post-id"));
const postId = parseInt($el.closest("article").data("post-id"), 10);
if (postId) {
api.preventCloak(postId);
}

View File

@@ -140,7 +140,7 @@ export default Controller.extend({
)
pollMaxOptions(isRegular, isMultiple, isNumber, count, pollMin, pollStep) {
if (isRegular) return;
const pollMinInt = parseInt(pollMin) || 1;
const pollMinInt = parseInt(pollMin, 10) || 1;
if (isMultiple) {
return this._comboboxOptions(pollMinInt + 1, count + 1);
@@ -159,7 +159,7 @@ export default Controller.extend({
@computed("isNumber", "pollMax")
pollStepOptions(isNumber, pollMax) {
if (!isNumber) return;
return this._comboboxOptions(1, (parseInt(pollMax) || 1) + 1);
return this._comboboxOptions(1, (parseInt(pollMax, 10) || 1) + 1);
},
@computed(