Skip to content

Commit

Permalink
fix issue in test-vm-goja evergreen test
Browse files Browse the repository at this point in the history
  • Loading branch information
Calvinnix committed Oct 18, 2023
1 parent 99f201f commit 9663ef1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions object.go
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,10 @@ func (o *Object) ordinaryToPrimitiveNumber() Value {
}

func (o *Object) ordinaryToPrimitiveString() Value {
if o.Prototype() == nil {
o.self.setProto(o.runtime.global.ObjectPrototype, false)
}

if v := o.tryPrimitive("toString"); v != nil {
return v
}
Expand Down

0 comments on commit 9663ef1

Please sign in to comment.