fix(fluxWizard): clone cached values to avoid cache polution

pull/5852/head
Pavel Zavora 2022-02-02 14:53:32 +01:00
parent 72bea3b854
commit 4671a874bf
1 changed files with 8 additions and 10 deletions

View File

@ -79,11 +79,10 @@ class QueryBuilderFetcher {
this.findKeysQueries[tagIndex] = pendingResult this.findKeysQueries[tagIndex] = pendingResult
pendingResult.promise pendingResult.promise = pendingResult.promise.then(result => {
.then(result => { this.findKeysCache[cacheKey] = [...result]
this.findKeysCache[cacheKey] = result return result
}) })
.catch(() => {})
return pendingResult.promise return pendingResult.promise
} }
@ -121,11 +120,10 @@ class QueryBuilderFetcher {
this.findValuesQueries[tagIndex] = pendingResult this.findValuesQueries[tagIndex] = pendingResult
pendingResult.promise pendingResult.promise = pendingResult.promise.then(result => {
.then(result => { this.findValuesCache[cacheKey] = [...result]
this.findValuesCache[cacheKey] = result return result
}) })
.catch(() => {})
return pendingResult.promise return pendingResult.promise
} }