File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1975,7 +1975,8 @@ class Component {
1975
1975
const existingActionIndex = this . pendingActions . findIndex ( action => action . name === name ) ;
1976
1976
if ( existingActionIndex !== - 1 ) {
1977
1977
this . pendingActions [ existingActionIndex ] . args = args ;
1978
- } else {
1978
+ }
1979
+ else {
1979
1980
this . pendingActions . push ( {
1980
1981
name,
1981
1982
args
Original file line number Diff line number Diff line change @@ -163,10 +163,15 @@ export default class Component {
163
163
164
164
action ( name : string , args : any = { } , debounce : number | boolean = false ) : Promise < BackendResponse > {
165
165
const promise = this . nextRequestPromise ;
166
- this . pendingActions . push ( {
167
- name,
168
- args
169
- } ) ;
166
+ const existingActionIndex = this . pendingActions . findIndex ( action => action . name === name ) ;
167
+ if ( existingActionIndex !== - 1 ) {
168
+ this . pendingActions [ existingActionIndex ] . args = args ;
169
+ } else {
170
+ this . pendingActions . push ( {
171
+ name,
172
+ args
173
+ } ) ;
174
+ }
170
175
171
176
this . debouncedStartRequest ( debounce ) ;
172
177
Original file line number Diff line number Diff line change 2127
2127
resolved "https://registry.npmjs.org/@hotwired/stimulus/-/stimulus-3.2.1.tgz"
2128
2128
integrity sha512-HGlzDcf9vv/EQrMJ5ZG6VWNs8Z/xMN+1o2OhV1gKiSG6CqZt5MCBB1gRg5ILiN3U0jEAxuDTNPRfBcnZBDmupQ==
2129
2129
2130
- " @hotwired/turbo@^8.0 " :
2130
+ " @hotwired/turbo@^7.1.0 || ^ 8.0 " :
2131
2131
version "8.0.4"
2132
2132
resolved "https://registry.yarnpkg.com/@hotwired/turbo/-/turbo-8.0.4.tgz#5c5361c06a37cdf10dcba4223f1afd0ca1c75091"
2133
2133
integrity sha512-mlZEFUZrJnpfj+g/XeCWWuokvQyN68WvM78JM+0jfSFc98wegm259vCbC1zSllcspRwbgXK31ibehCy5PA78/Q==
You can’t perform that action at this time.
0 commit comments