mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-27 16:07:42 +08:00
commands: Fixed value mutation bug in Request#SetOption
This commit is contained in:

committed by
Juan Batiz-Benet

parent
6faeee8300
commit
8c9ee52a93
@ -92,7 +92,7 @@ func (r *request) SetOption(name string, val interface{}) {
|
|||||||
|
|
||||||
// try all the possible names, if we already have a value then set over it
|
// try all the possible names, if we already have a value then set over it
|
||||||
for _, n := range option.Names {
|
for _, n := range option.Names {
|
||||||
val, found := r.options[n]
|
_, found := r.options[n]
|
||||||
if found {
|
if found {
|
||||||
r.options[n] = val
|
r.options[n] = val
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user