mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
check if close is function
This commit is contained in:
parent
4540411709
commit
7648d8f4e1
1 changed files with 1 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ const SharePrompt = ({ className, label, url, close }) => {
|
|||
}, []);
|
||||
React.useEffect(() => {
|
||||
const onKeyUp = (event) => {
|
||||
if (event.key === 'Escape') {
|
||||
if (event.key === 'Escape' && typeof close === 'function') {
|
||||
close();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue