Skip to content

Commit be617d6

Browse files
committed
concatenate bound function args with local args
1 parent b8e5744 commit be617d6

File tree

1 file changed

+3
-3
lines changed
  • crates/dash_vm/src/value/function

1 file changed

+3
-3
lines changed

Diff for: crates/dash_vm/src/value/function/bound.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::frame::This;
44
use crate::gc::ObjectId;
55
use crate::value::object::{NamedObject, Object};
66
use crate::value::{Typeof, Unrooted, Value};
7-
use crate::{delegate, extract, Vm};
7+
use crate::{Vm, delegate, extract};
88

99
#[derive(Debug, Trace)]
1010
pub struct BoundFunction {
@@ -47,8 +47,8 @@ impl Object for BoundFunction {
4747
) -> Result<Unrooted, Unrooted> {
4848
let target_this = self.this.map_or(this, This::Bound);
4949

50-
// TODO: args should be concatenated with self.args
51-
let target_args = self.args.clone().unwrap_or(args);
50+
let mut target_args = self.args.clone().unwrap_or_default();
51+
target_args.extend(args);
5252

5353
self.callee.apply(scope, target_this, target_args)
5454
}

0 commit comments

Comments
 (0)