nextcloud / forms

📝 Simple form & survey app for Nextcloud
https://apps.nextcloud.com/apps/forms
GNU Affero General Public License v3.0
316 stars 97 forks source link

fix: Fix merging of options for cancelable request #2260

Closed Koc closed 2 months ago

Koc commented 2 months ago

I'm using this CancelableRequest for own needs but it has a bug with merging options. Here an reproducer:

// Create new cancelable get request
const { request, cancel } = CancelableRequest(async function(url, requestOptions) {
    return axios.get(url, requestOptions)
})

const response = await request(generateOcsUrl('apps/forms/api/v2.4/form/{id}', { id }), {params: {tenant}})

the problem is that merging of options merges extra options under options key instead of it merging all keys and values.