We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8e5744 commit be617d6Copy full SHA for be617d6
crates/dash_vm/src/value/function/bound.rs
@@ -4,7 +4,7 @@ use crate::frame::This;
4
use crate::gc::ObjectId;
5
use crate::value::object::{NamedObject, Object};
6
use crate::value::{Typeof, Unrooted, Value};
7
-use crate::{delegate, extract, Vm};
+use crate::{Vm, delegate, extract};
8
9
#[derive(Debug, Trace)]
10
pub struct BoundFunction {
@@ -47,8 +47,8 @@ impl Object for BoundFunction {
47
) -> Result<Unrooted, Unrooted> {
48
let target_this = self.this.map_or(this, This::Bound);
49
50
- // TODO: args should be concatenated with self.args
51
- let target_args = self.args.clone().unwrap_or(args);
+ let mut target_args = self.args.clone().unwrap_or_default();
+ target_args.extend(args);
52
53
self.callee.apply(scope, target_this, target_args)
54
}
0 commit comments