Skip to content

Commit

Permalink
Merge pull request #254 from vtex-apps/rollback-v0.19.0
Browse files Browse the repository at this point in the history
Rollback v0.19.0
  • Loading branch information
vitorflg authored Oct 20, 2020
2 parents 2996f93 + 650665a commit 0dc0dc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.54.0] - 2020-10-20
### Added
- `totalAvailable` and `distinctAvailable` values for `itemCountMode`.

## [2.54.0] - 2020-10-20 [YANKED]
### Added
- `totalAvailable` and `distinctAvailable` values for `itemCountMode`.

### Fixed
- Use navigate when redirecting to checkout
Expand Down
6 changes: 3 additions & 3 deletions react/modules/checkoutHook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { useRuntime } from 'vtex.render-runtime'

export default function useCheckout() {
const { url: checkoutUrl, major } = useCheckoutURL()
const { navigate } = useRuntime()
const { navigate, rootPath = '' } = useRuntime()

const goToCheckout = (url: string) => {
if (major > 0 && url === checkoutUrl) {
navigate({ to: url, fallbackToWindowLocation: false })
navigate({ to: url })
} else {
navigate({ to: url, fallbackToWindowLocation: true })
window.location.href = `${rootPath}${url}`
}
}

Expand Down

0 comments on commit 0dc0dc2

Please sign in to comment.