@koine/api 1.0.57 → 1.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/createSwrApi.js +1 -1
- package/node/createSwrApi.js +1 -1
- package/package.json +2 -2
package/createSwrApi.js
CHANGED
|
@@ -35,7 +35,7 @@ function createUseApi(api, method) {
|
|
|
35
35
|
var config_1 = _config;
|
|
36
36
|
// <Data = any, Error = any>(key: Key, config: SWRConfiguration<Data, Error, Fetcher<Data>> | undefined): SWRResponse<Data, Error>;
|
|
37
37
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
38
|
-
return useSWR(options ? [endpoint, options] : [endpoint], fetcher, config_1);
|
|
38
|
+
return useSWR(!endpoint ? null : options ? [endpoint, options] : [endpoint], fetcher, config_1);
|
|
39
39
|
}
|
|
40
40
|
var config = _config;
|
|
41
41
|
var sender = function (
|
package/node/createSwrApi.js
CHANGED
|
@@ -38,7 +38,7 @@ function createUseApi(api, method) {
|
|
|
38
38
|
var config_1 = _config;
|
|
39
39
|
// <Data = any, Error = any>(key: Key, config: SWRConfiguration<Data, Error, Fetcher<Data>> | undefined): SWRResponse<Data, Error>;
|
|
40
40
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
41
|
-
return (0, swr_1.default)(options ? [endpoint, options] : [endpoint], fetcher, config_1);
|
|
41
|
+
return (0, swr_1.default)(!endpoint ? null : options ? [endpoint, options] : [endpoint], fetcher, config_1);
|
|
42
42
|
}
|
|
43
43
|
var config = _config;
|
|
44
44
|
var sender = function (
|
package/package.json
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
"typings": "./index.d.ts",
|
|
6
6
|
"dependencies": {},
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"@koine/utils": "1.0.
|
|
8
|
+
"@koine/utils": "1.0.58",
|
|
9
9
|
"swr": "^2.0.0-beta.6",
|
|
10
10
|
"next": "^12.2.0",
|
|
11
11
|
"tslib": "^2.4.0"
|
|
12
12
|
},
|
|
13
|
-
"version": "1.0.
|
|
13
|
+
"version": "1.0.58",
|
|
14
14
|
"module": "./index.js",
|
|
15
15
|
"types": "./index.d.ts"
|
|
16
16
|
}
|