use filterInvalidDOMProps

This commit is contained in:
nklhrstv 2022-05-27 13:08:33 +03:00
parent 6d8bb2e152
commit d24b943017
3 changed files with 16 additions and 1 deletions

13
package-lock.json generated
View file

@ -4681,6 +4681,14 @@
"to-regex-range": "^5.0.1"
}
},
"filter-invalid-dom-props": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/filter-invalid-dom-props/-/filter-invalid-dom-props-2.1.0.tgz",
"integrity": "sha512-M+1dTOodTQwB9Ncin+EwfgksarMCeAW1V2BjPeC5THFSs56rtEX/VF/Mrur9C9A8eyaY+2h25VFAiVr+bkVkwA==",
"requires": {
"html-attributes": "1.1.0"
}
},
"finalhandler": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
@ -5025,6 +5033,11 @@
}
}
},
"html-attributes": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/html-attributes/-/html-attributes-1.1.0.tgz",
"integrity": "sha1-ggJ6T6x6YHDqbBjMOIauoY1t6gk="
},
"html-encoding-sniffer": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz",

View file

@ -22,6 +22,7 @@
"buffer": "6.0.3",
"classnames": "2.3.1",
"eventemitter3": "4.0.7",
"filter-invalid-dom-props": "2.1.0",
"lodash.debounce": "4.0.8",
"lodash.isequal": "4.5.0",
"lodash.throttle": "4.1.1",

View file

@ -3,6 +3,7 @@
const React = require('react');
const PropTypes = require('prop-types');
const classnames = require('classnames');
const filterInvalidDOMProps = require('filter-invalid-dom-props').default;
const Icon = require('@stremio/stremio-icons/dom');
const Button = require('stremio/common/Button');
const Image = require('stremio/common/Image');
@ -75,7 +76,7 @@ const MetaItem = React.memo(({ className, type, name, poster, posterShape, playI
<Icon className={styles['icon']} icon={'ic_more'} />
), []);
return (
<Button title={name} href={href} {...props} className={classnames(className, styles['meta-item-container'], styles['poster-shape-poster'], styles[`poster-shape-${posterShape}`], { 'active': menuOpen })} onClick={metaItemOnClick}>
<Button title={name} href={href} {...filterInvalidDOMProps(props)} className={classnames(className, styles['meta-item-container'], styles['poster-shape-poster'], styles[`poster-shape-${posterShape}`], { 'active': menuOpen })} onClick={metaItemOnClick}>
<div className={styles['poster-container']}>
<div className={styles['poster-image-layer']}>
<Image