mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-19 18:48:17 +00:00
additional validation to the href prop added to NavTabButton
This commit is contained in:
parent
97b2244e3e
commit
ca2ca88a44
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ const styles = require('./styles');
|
|||
|
||||
const NavTabButton = ({ className, icon, label, href, onClick }) => {
|
||||
const routeRegexp = React.useMemo(() => {
|
||||
if (typeof href === 'string') {
|
||||
if (typeof href === 'string' && href.startsWith('#')) {
|
||||
for (const { regexp } of Object.values(routesRegexp)) {
|
||||
if (href.slice(1).match(regexp)) {
|
||||
return regexp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue