From 71b4d9f701f1d1615bd8c37a3f4fdd5a242b8d0c Mon Sep 17 00:00:00 2001 From: Slava Nossar Date: Fri, 20 Jan 2023 16:04:11 +1100 Subject: [PATCH] parse clientId for query composables when there are 3 parameters --- src/runtime/composables.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/composables.ts b/src/runtime/composables.ts index 9d6bc7d3..790477f8 100644 --- a/src/runtime/composables.ts +++ b/src/runtime/composables.ts @@ -40,7 +40,7 @@ const prep = (...args: any) => { const query = args?.[0]?.query || args?.[0] const cache = args?.[0]?.cache ?? true const variables = args?.[0]?.variables || (typeof args?.[1] !== 'string' && args?.[1]) || undefined - let clientId = args?.[0]?.clientId || (typeof args?.[1] === 'string' && args?.[1]) || undefined + let clientId = args?.[0]?.clientId || (typeof args?.[1] === 'string' && args?.[1]) || (typeof args?.[2] === 'string' && args?.[2]) || undefined if (!clientId || !clients?.[clientId]) { clientId = clients?.default ? 'default' : Object.keys(clients!)[0]