mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user