Skip to content

Commit

Permalink
Update checkResponse to comply with the new format (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
indykoning authored Oct 31, 2024
1 parent 154845f commit 6670f86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"require": {
"php": "^8.0|^8.1",
"rapidez/core": "^2.0|^3.0",
"rapidez/core": "^2.11|^3.0",
"blade-ui-kit/blade-heroicons": "^2.0"
},
"autoload": {
Expand Down
5 changes: 3 additions & 2 deletions resources/js/components/amastybundles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@
this.added = true
setTimeout(() => { this.added = false }, this.addedDuration)
} catch (error) {
error?.response && (await this.checkResponseForExpiredCart(error.response))
const responseData = await error?.response?.json()
responseData && (await this.checkResponseForExpiredCart({}, responseData))
Notify(error?.response?.data?.message || error.message, 'error')
Notify(responseData?.data?.message || error.message, 'error')
}
this.adding = false
Expand Down

0 comments on commit 6670f86

Please sign in to comment.