@equinor/fusion
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -68,4 +68,6 @@ import { useState, useCallback, useEffect } from "react"; | ||
useDebouncedAbortable(async (query) => { | ||
var response = await apiClients.context.queryContextsAsync(query, type); | ||
setContexts(response.data); | ||
if (query && query.length > 2) { | ||
var response = await apiClients.context.queryContextsAsync(query, type); | ||
setContexts(response.data); | ||
} | ||
}, queryText); | ||
@@ -72,0 +74,0 @@ return [contexts, setQueryText]; |
@@ -9,3 +9,3 @@ import { useEffect } from "react"; | ||
abort = abortable(async () => await abortableAction(value)); | ||
}); | ||
}, delay); | ||
return () => { | ||
@@ -12,0 +12,0 @@ if (abort !== null) { |
@@ -23,8 +23,14 @@ import uuid from "uuid/v1"; | ||
init = ensureRequestInit(init, init => (Object.assign({}, init, { method: "GET" }))); | ||
const request = this.performFetchAsync(url, init); | ||
this.requestsInProgress[url] = request; | ||
const response = await request; | ||
delete this.requestsInProgress[url]; | ||
await this.resourceCache.updateAsync(url, response); | ||
return response; | ||
try { | ||
const request = this.performFetchAsync(url, init); | ||
this.requestsInProgress[url] = request; | ||
const response = await request; | ||
delete this.requestsInProgress[url]; | ||
await this.resourceCache.updateAsync(url, response); | ||
return response; | ||
} | ||
catch (error) { | ||
delete this.requestsInProgress[url]; | ||
throw error; | ||
} | ||
} | ||
@@ -31,0 +37,0 @@ async postAsync(url, body, init) { |
{ | ||
"name": "@equinor/fusion", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"description": "Everything a Fusion app needs to communicate with the core", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101661
2330