Fix broken twitch.tv functionality (#3858)

* Fix broken twitch.tv functionality

Fixes some features of twitch.tv which are broken due to device id change on every gql request.

Related issues:
- https://github.com/pixeltris/TwitchAdSolutions/issues/50
- https://github.com/pixeltris/TwitchAdSolutions/issues/45

* Use strict equality
This commit is contained in:
pixeltris 2021-10-14 15:03:25 +01:00 committed by GitHub
parent c0b399a3be
commit cc0008df57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1571,7 +1571,9 @@
typeof url === 'string' &&
url.includes('gql') &&
init instanceof Object &&
init.headers instanceof Object
init.headers instanceof Object &&
typeof init.body === 'string' &&
init.body.includes('PlaybackAccessToken')
) {
const { headers } = init;
if ( typeof headers['X-Device-Id'] === 'string' ) {