Skip to content

Commit

Permalink
Fix: Fix output of Object.toString(), closes #729
Browse files Browse the repository at this point in the history
  • Loading branch information
RageKnify committed Sep 29, 2020
1 parent 3ce547d commit 271babb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions boa/src/builtins/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ impl Object {
/// [spec]: https://tc39.es/ecma262/#sec-object.prototype.tostring
/// [mdn]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString
#[allow(clippy::wrong_self_convention)]
pub fn to_string(this: &Value, _: &[Value], _: &mut Context) -> Result<Value> {
pub fn to_string(_: &Value, _: &[Value], _: &mut Context) -> Result<Value> {
// FIXME: it should not display the object.
Ok(this.display().to_string().into())
Ok("[object Object]".into())
}

/// `Object.prototype.hasOwnPrototype( property )`
Expand Down

0 comments on commit 271babb

Please sign in to comment.