Reset error on load

This commit is contained in:
rijkvanzanten
2020-08-05 14:02:45 -04:00
parent 6886c582fc
commit 950fd64b76
2 changed files with 2 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ export function useItem(collection: Ref<string>, primaryKey: Ref<string | number
async function getItem() {
loading.value = true;
error.value = null;
try {
const response = await api.get(itemEndpoint.value);

View File

@@ -112,6 +112,7 @@ export function useItems(collection: Ref<string>, query: Query) {
async function getItems() {
loading.value = true;
error.value = null;
let fieldsToFetch = [...fields.value];