summaryrefslogtreecommitdiff
path: root/src/hero.mjs
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-03-06 11:41:21 -0300
committerEuAndreh <eu@euandre.org>2024-03-06 11:45:43 -0300
commit3f58c2d5cdd94ab12cc53b207d33e281338c66e4 (patch)
tree453f2e7c25b099c7ff120d50a825d00c0f9df49c /src/hero.mjs
parentsrc/hero.mjs: Always recreate the unix socket file (diff)
downloadpapod-3f58c2d5cdd94ab12cc53b207d33e281338c66e4.tar.gz
papod-3f58c2d5cdd94ab12cc53b207d33e281338c66e4.tar.xz
src/utils.mjs: s/first/findFirst/g
Diffstat (limited to 'src/hero.mjs')
-rw-r--r--src/hero.mjs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hero.mjs b/src/hero.mjs
index fcbdc17..53f3086 100644
--- a/src/hero.mjs
+++ b/src/hero.mjs
@@ -89,7 +89,7 @@ export const firstParamMatch = (tree, segments, params) => {
const paramOptions = Object.keys(tree)
.filter(s => s.startsWith(":"))
.sort(u.strSortFn);
- return u.first(paramOptions, param => firstParamMatch(tree[param], nextSegments, {
+ return u.findFirst(paramOptions, param => firstParamMatch(tree[param], nextSegments, {
...params,
[param.slice(1)]: seg
}));