Skip to content

Commit

Permalink
fix: axios data or params get dirty values
Browse files Browse the repository at this point in the history
  • Loading branch information
cloydlau committed Aug 13, 2024
1 parent a0db34b commit 58ee6c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ function configToCaller(axios, urlPrefix, config) {
? 'data'
: 'params'
if (payloadAs === 'data') {
configComputed.data ??= payload
configComputed.data = payload
}
else if (payloadAs === 'params') {
configComputed.params ??= payload
configComputed.params = payload
}
}

Expand Down

0 comments on commit 58ee6c9

Please sign in to comment.