Skip to content

Commit

Permalink
Update compose.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Rain120 authored Mar 10, 2022
1 parent 48de24c commit 57417f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function compose() {
let last = len - 1;

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

Expand Down

0 comments on commit 57417f5

Please sign in to comment.