Skip to content

Commit 57417f5

Browse files
authored
Update compose.js
1 parent 48de24c commit 57417f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compose.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function compose() {
2727
let last = len - 1;
2828

2929
// 如果存在两个及以上参数,则调用最后一个参数函数,并传入内层函数;否则直接返回第 1 个参数函数。
30-
let result = len > 0
30+
let result = last > 0
3131
? args[last].apply(this, arguments)
3232
: args[0];
3333

0 commit comments

Comments
 (0)