Skip to content

Commit

Permalink
Merge pull request #125 from amansinghbais/dxp-components/#121
Browse files Browse the repository at this point in the history
Fixed: issue of goToOms button working when url contains api/ but not working when it contains api only(#121)
  • Loading branch information
ravilodhi authored Sep 7, 2023
2 parents 8566042 + 70e1683 commit b999980
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const goToOms = (token: string, oms: string) => {
const link = (oms.startsWith('http') ? oms.replace('api/', "") : `https://${oms}.hotwax.io/`) + `?token=${token}`
const link = (oms.startsWith('http') ? oms.replace(/api\/?/, "") : `https://${oms}.hotwax.io/`) + `?token=${token}`

window.open(link, '_blank', 'noopener, noreferrer')
}

Expand Down

0 comments on commit b999980

Please sign in to comment.