http-react
Advanced tools
Comparing version 3.5.2 to 3.5.3
@@ -36,6 +36,6 @@ 'use client'; | ||
function FetchConfig(props) { | ||
var _a, _b, _c, _d, _e; | ||
var children = props.children, _f = props.defaults, defaults = _f === void 0 ? {} : _f, _g = props.value, value = _g === void 0 ? {} : _g, _h = props.suspense, suspense = _h === void 0 ? [] : _h, clientOnly = props.clientOnly; | ||
var _a, _b, _c, _d, _e, _f; | ||
var children = props.children, _g = props.defaults, defaults = _g === void 0 ? {} : _g, _h = props.value, value = _h === void 0 ? {} : _h, _j = props.suspense, suspense = _j === void 0 ? [] : _j, clientOnly = props.clientOnly; | ||
var previousConfig = (0, internal_1.useHRFContext)(); | ||
var _j = previousConfig.cacheProvider, cacheProvider = _j === void 0 ? internal_1.defaultCache : _j; | ||
var _k = previousConfig.cacheProvider, cacheProvider = _k === void 0 ? internal_1.defaultCache : _k; | ||
for (var valueKey in value) { | ||
@@ -54,5 +54,6 @@ var resolvedKey = (0, shared_1.serialize)({ | ||
try { | ||
parsedChunk = JSON.parse(dataChunk.value); | ||
var parsedChunkValue = JSON.parse(dataChunk.value); | ||
parsedChunk = (_c = parsedChunkValue === null || parsedChunkValue === void 0 ? void 0 : parsedChunkValue.data) !== null && _c !== void 0 ? _c : parsedChunkValue; | ||
} | ||
catch (_k) { | ||
catch (_l) { | ||
parsedChunk = dataChunk; | ||
@@ -75,3 +76,3 @@ } | ||
for (var defaultKey in defaults) { | ||
var _l = defaults[defaultKey].id, id = _l === void 0 ? defaultKey : _l; | ||
var _m = defaults[defaultKey].id, id = _m === void 0 ? defaultKey : _m; | ||
var resolvedKey = (0, shared_1.serialize)({ | ||
@@ -82,10 +83,10 @@ idString: (0, shared_1.serialize)(id) | ||
if (!(0, shared_1.isDefined)(internal_1.valuesMemory.get(resolvedKey))) { | ||
internal_1.valuesMemory.set(resolvedKey, (_c = defaults[defaultKey]) === null || _c === void 0 ? void 0 : _c.value); | ||
internal_1.valuesMemory.set(resolvedKey, (_d = defaults[defaultKey]) === null || _d === void 0 ? void 0 : _d.value); | ||
} | ||
if (!(0, shared_1.isDefined)(internal_1.fetcherDefaults.get(resolvedKey))) { | ||
internal_1.fetcherDefaults.set(resolvedKey, (_d = defaults[defaultKey]) === null || _d === void 0 ? void 0 : _d.value); | ||
internal_1.fetcherDefaults.set(resolvedKey, (_e = defaults[defaultKey]) === null || _e === void 0 ? void 0 : _e.value); | ||
} | ||
} | ||
if (!(0, shared_1.isDefined)(cacheProvider.get(resolvedKey))) { | ||
cacheProvider.set(resolvedKey, (_e = defaults[defaultKey]) === null || _e === void 0 ? void 0 : _e.value); | ||
cacheProvider.set(resolvedKey, (_f = defaults[defaultKey]) === null || _f === void 0 ? void 0 : _f.value); | ||
} | ||
@@ -92,0 +93,0 @@ } |
{ | ||
"name": "http-react", | ||
"version": "3.5.2", | ||
"version": "3.5.3", | ||
"description": "React hooks for data fetching", | ||
@@ -5,0 +5,0 @@ "main": "dist/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
259589
5697