avm2: String.toString defaults to ""
This commit is contained in:
parent
afac907f80
commit
7316f51cb1
|
@ -622,7 +622,13 @@ fn to_string<'gc>(
|
||||||
this: Object<'gc>,
|
this: Object<'gc>,
|
||||||
_args: &[Value<'gc>],
|
_args: &[Value<'gc>],
|
||||||
) -> Result<Value<'gc>, Error<'gc>> {
|
) -> Result<Value<'gc>, Error<'gc>> {
|
||||||
Ok(Value::from(this))
|
if let Some(this) = this.as_primitive() {
|
||||||
|
if let Value::String(v) = *this {
|
||||||
|
return Ok(v.into());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok("".into())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Implements `String.valueOf`
|
/// Implements `String.valueOf`
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
num_ticks = 1
|
num_ticks = 1
|
||||||
known_failure = true
|
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
num_ticks = 1
|
num_ticks = 1
|
||||||
known_failure = true
|
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
num_ticks = 1
|
num_ticks = 1
|
||||||
known_failure = true
|
|
||||||
|
|
Loading…
Reference in New Issue