File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { TraktClient } from '@dvcol/trakt-http-client';
17
17
18
18
import { TraktApiExtended } from '@dvcol/trakt-http-client/models' ;
19
19
20
+ import { chromeRuntimeId } from '@dvcol/web-extension-utils/chrome/runtime' ;
20
21
import { createTab } from '@dvcol/web-extension-utils/chrome/tabs' ;
21
22
22
23
import type { JsonWriterOptions } from '@dvcol/common-utils/common/save' ;
@@ -177,7 +178,8 @@ export class TraktService {
177
178
const url = this . traktClient
178
179
. redirectToAuthenticationUrl ( params )
179
180
. replace ( `${ traktClientSettings . corsProxy } /${ traktClientSettings . corsPrefix } ` , traktClientSettings . endpoint ) ;
180
- return createTab ( { url } ) ;
181
+ if ( chromeRuntimeId ) return createTab ( { url } ) ;
182
+ window . location . href = url ;
181
183
}
182
184
183
185
static async login ( token : string ) : Promise < { auth : SettingsAuth ; settings : UserSetting } > {
You can’t perform that action at this time.
0 commit comments