From e5679ec14ba4bb44ff7ffa1e8074b8a55f019d95 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Thu, 7 Aug 2025 16:19:13 +0200 Subject: [PATCH] Move API action option to the correct argument --- lib/www/client/source/src/store/modules/api/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/www/client/source/src/store/modules/api/actions.js b/lib/www/client/source/src/store/modules/api/actions.js index 5bb0939..3025b0d 100644 --- a/lib/www/client/source/src/store/modules/api/actions.js +++ b/lib/www/client/source/src/store/modules/api/actions.js @@ -108,8 +108,8 @@ async function api ({state, getters, commit, dispatch}, [resource, init = {}, cb try { if (!res.bodyUsed) { // It may have been consumed by a callback const validFormats = [ "arrayBuffer", "blob", "formData", "json", "text" ]; - if (init.format && validFormats.includes(init.format)) { - return await res[init.format](); + if (opts.format && validFormats.includes(opts.format)) { + return await res[opts.format](); } else { return await res.json(); }