diff --git a/src/utils/addPrefix.ts b/src/utils/addPrefix.ts index e3fada42f..42da52a54 100644 --- a/src/utils/addPrefix.ts +++ b/src/utils/addPrefix.ts @@ -7,13 +7,13 @@ export const addPrefix = >( ): PrefixedMap => { const res = {} as PrefixedMap; - Object.keys(actions).forEach((key) => { + for (const [key, value] of Object.entries(actions)) { const prop = key as keyof T; res[prop] = `${prefix}${ typeof separator === "string" ? separator : "/" - }${String(res[prop])}`; - }); + }${value}`; + } return res; };