Skip to content

Commit

Permalink
Update deps and fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
talk2MeGooseman committed Aug 22, 2021
1 parent a824b1f commit 1da0e14
Show file tree
Hide file tree
Showing 3 changed files with 4,871 additions and 5,188 deletions.
8 changes: 3 additions & 5 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { usePlayerReady } from './usePlayerReady'
import { DEFAULT_HEIGHT, DEFAULT_TARGET_ID, DEFAULT_WIDTH } from './utils'

const hasTwitchApiLoaded = () =>
Boolean(((root as unknown) as ITwitchWindow)?.Twitch?.Embed)
Boolean((root as unknown as ITwitchWindow)?.Twitch?.Embed)

const TwitchEmbedVideo = (
props:
Expand All @@ -34,10 +34,8 @@ const TwitchEmbedVideo = (
useEffect(() => {
if (!hasTwitchApiLoaded()) return

const {
VIDEO_PLAY,
VIDEO_READY,
} = ((root as unknown) as ITwitchWindow).Twitch.Embed
const { VIDEO_PLAY, VIDEO_READY } = (root as unknown as ITwitchWindow)
.Twitch.Embed

const removeVideoPlayListener = eventListenerFactory(
VIDEO_PLAY,
Expand Down
2 changes: 1 addition & 1 deletion src/useEmbedApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const useTwitchEmbed = (
const [embed, setEmbed] = useState<ITwitchEmbed>()

const initialize = useCallback(() => {
const twitchEmbed = new ((root as unknown) as ITwitchWindow).Twitch.Embed(
const twitchEmbed = new (root as unknown as ITwitchWindow).Twitch.Embed(
props.targetId ?? '',
{
...props,
Expand Down
Loading

0 comments on commit 1da0e14

Please sign in to comment.