Skip to content

Commit

Permalink
fix(configuration): fail to update subscription (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
igoogolx authored Jan 1, 2025
1 parent 9ddee52 commit 569812a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/configuration/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func AddProxies(proxies []map[string]interface{}, subscriptionUrl string) ([]map
}
}

if targetIndex < len(newProxy) {
if targetIndex != -1 && targetIndex < len(newProxy) {
newProxy = slices.Insert(newProxy, targetIndex, newProxyWithIds...)
} else {
newProxy = append(newProxy, newProxyWithIds...)
Expand Down

0 comments on commit 569812a

Please sign in to comment.