Skip to content

Commit

Permalink
chore: instead of window use isbrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
behnaz-deriv committed Sep 9, 2024
1 parent 2a2e5b4 commit 92e200c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion themes/gatsby-theme-deriv/src/common/url-affiliate-token.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

import { isBrowser } from './utility'
export const affiliateTokenURL = () => {
if (!window) return;
//if (!window) return;isBrowser
if (!isBrowser()) return;
const query_string = window.location.search
const url_params = new URLSearchParams(query_string)
const aff_token = url_params.get('t')
Expand Down

0 comments on commit 92e200c

Please sign in to comment.