Browse Source

Fix construct usage (#1286)

pull/1287/head
0x7D2B 4 years ago committed by GitHub
parent
commit
52bd1e72f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      boa/src/builtins/array/mod.rs

2
boa/src/builtins/array/mod.rs

@ -301,7 +301,7 @@ impl Array {
if !c.is_constructable() { if !c.is_constructable() {
return context.throw_type_error("Symbol.species must be a constructor"); return context.throw_type_error("Symbol.species must be a constructor");
} }
c.construct(&[Value::from(length)], c.clone().into(), context) c.construct(&[Value::from(length)], &c.clone().into(), context)
} else { } else {
context.throw_type_error("Symbol.species must be a constructor") context.throw_type_error("Symbol.species must be a constructor")
} }

Loading…
Cancel
Save