Browse Source

Fix function property order (#2305)

This Pull Request changes the following:

- Fix function property order
pull/2311/head
raskad 2 years ago
parent
commit
0213f9f1e5
  1. 12
      boa_engine/src/vm/code_block.rs

12
boa_engine/src/vm/code_block.rs

@ -538,17 +538,17 @@ pub(crate) fn create_function_object(
.configurable(false)
.build();
constructor
.define_property_or_throw("length", length_property, context)
.expect("failed to define the length property of the function");
constructor
.define_property_or_throw("name", name_property, context)
.expect("failed to define the name property of the function");
if !r#async {
constructor
.define_property_or_throw("prototype", prototype_property, context)
.expect("failed to define the prototype property of the function");
}
constructor
.define_property_or_throw("name", name_property, context)
.expect("failed to define the name property of the function");
constructor
.define_property_or_throw("length", length_property, context)
.expect("failed to define the length property of the function");
constructor
}

Loading…
Cancel
Save