mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
Merge pull request #198 from Stremio/parse-int-usage
ParseInt with base
This commit is contained in:
commit
ea155a87a3
3 changed files with 3 additions and 3 deletions
|
|
@ -53,7 +53,7 @@ const Discover = ({ urlParams, queryParams }) => {
|
|||
}, [selectedMetaItem]);
|
||||
const metaItemsOnFocusCapture = React.useCallback((event) => {
|
||||
if (event.target.dataset.index !== null && !isNaN(event.target.dataset.index)) {
|
||||
setSelectedMetaItemIndex(parseInt(event.target.dataset.index));
|
||||
setSelectedMetaItemIndex(parseInt(event.target.dataset.index, 10));
|
||||
}
|
||||
}, []);
|
||||
const metaItemOnClick = React.useCallback((event) => {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const React = require('react');
|
|||
const useSeason = (urlParams, queryParams) => {
|
||||
const season = React.useMemo(() => {
|
||||
return queryParams.has('season') && !isNaN(queryParams.get('season')) ?
|
||||
parseInt(queryParams.get('season'))
|
||||
parseInt(queryParams.get('season'), 10)
|
||||
:
|
||||
null;
|
||||
}, [queryParams]);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ const useProfileSettingsInputs = (profile) => {
|
|||
action: 'UpdateSettings',
|
||||
args: {
|
||||
...profile.settings,
|
||||
subtitlesSize: parseInt(event.value)
|
||||
subtitlesSize: parseInt(event.value, 10)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue