refactor: variablesRef is now always a Ref

This commit is contained in:
Guillaume Chau 2019-11-29 13:56:28 +01:00
parent bec8252295
commit 139b2158cf

View File

@ -29,7 +29,7 @@ export function useQuery<
if (variables == null) variables = ref()
if (options == null) options = {}
const documentRef = paramToRef(document)
const variablesRef = paramToReactive(variables)
const variablesRef = paramToRef(variables)
const optionsRef = paramToReactive(options)
// Result
@ -141,7 +141,7 @@ export function useQuery<
// Applying variables
let currentVariables: TVariables
watch(() => isRef(variablesRef) ? variablesRef.value : variablesRef, value => {
watch(variablesRef, value => {
currentVariables = value
restart()
}, {