fix(useQuery): isEnabled

This commit is contained in:
Guillaume Chau
2019-12-02 03:39:41 +01:00
parent f9c3f72900
commit e930f0cbff
@@ -306,7 +306,7 @@ export function useQuery<
// @TODO Doesn't fully work yet, need to initialize with option
const enabled = ref<boolean>()
const enabledOption = computed(() => !currentOptions.value || currentOptions.value.enabled == null || currentOptions.value.enabled)
const isEnabled = computed(() => !!((typeof enabled.value === 'boolean' && enabled.value) && enabledOption.value))
const isEnabled = computed(() => !!((typeof enabled.value !== 'boolean' || enabled.value) && enabledOption.value))
watch(enabled, value => {
if (value == null) {