Skip to content

Commit

Permalink
Apply review
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Sep 25, 2023
1 parent 941a632 commit bb29381
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions boa_engine/src/builtins/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

use std::{fmt, str::FromStr};

use crate::{
object::{JsObject, ObjectData},
Context, JsNativeError, JsResult, JsString, JsValue,
};
use crate::{object::JsObject, Context, JsNativeError, JsResult, JsString, JsValue};

/// A type used as an option parameter for [`get_option`].
pub(crate) trait OptionType: Sized {
Expand Down Expand Up @@ -87,7 +84,7 @@ pub(crate) fn get_options_object(options: &JsValue) -> JsResult<JsObject> {
// If options is undefined, then
JsValue::Undefined => {
// a. Return OrdinaryObjectCreate(null).
Ok(JsObject::from_proto_and_data(None, ObjectData::ordinary()))
Ok(JsObject::with_null_proto())
}
// 2. If Type(options) is Object, then
JsValue::Object(obj) => {
Expand Down

0 comments on commit bb29381

Please sign in to comment.