Skip to content

Commit a292b28

Browse files
committed
Use args[0] as this argument when applying function, return result.
1 parent 1d8a538 commit a292b28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/javascript/lib/core/functions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ function call_property(item, property) {
3333

3434
function apply(...args) {
3535
if (args.length === 2) {
36-
args[0].apply(null, args.slice(1));
36+
return args[0].apply(args[0], args.slice(1));
3737
} else {
38-
args[0][args[1]].apply(null, args.slice(2));
38+
return args[0][args[1]].apply(args[0], args.slice(2));
3939
}
4040
}
4141

0 commit comments

Comments
 (0)