@colisweb/rescript-toolkit 2.54.1 → 2.54.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "2.54.1",
3
+ "version": "2.54.2",
4
4
  "scripts": {
5
5
  "clean": "rescript clean",
6
6
  "build": "rescript build -with-deps",
@@ -10,11 +10,15 @@ module Make = (Config: Config) => {
10
10
  ~options: option<Swr.fetcherOptions>=?,
11
11
  key: option<Config.Request.argument>,
12
12
  ): Toolkit__Hooks.fetcher<Config.Request.response> =>
13
- Toolkit__Hooks.useFetcher(~options?, key->Option.map(Config.key), () => {
14
- let key = key->Option.getExn
13
+ Toolkit__Hooks.useFetcher(
14
+ ~options?,
15
+ key->Option.map(k => Config.key(k)->Js.Array2.joinWith("--")),
16
+ () => {
17
+ let key = key->Option.getExn
15
18
 
16
- Config.Request.exec(key)->Promise.Js.fromResult
17
- })
19
+ Config.Request.exec(key)->Promise.Js.fromResult
20
+ },
21
+ )
18
22
 
19
23
  let useOptional = (
20
24
  ~options: option<Swr.fetcherOptions>=?,