ES5: typo in Error.prototype.toString()

# Michael Day (15 years ago)

In ES5 "15.11.4.4 Error.prototype.toString()" states:

 6. If msg is undefined, then let R be msg.

I'm pretty sure that should say:

 6. If msg is undefined, then let R be name.

ie. if an Error object does not have a message property, then toString() will return the value of the name property, or "Error" if it doesn't have a name property either. This is what Mozilla currently does.