mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
Now that Array.prototype.join() is producing the correct results we can remove the separate code path for arrays in Value::to_number() and treat them like all other objects - using to_primitive() with number as the preferred type and then calling to_number() on the result. This is how the spec descibes it. This also means we don't crash anymore when trying to coerce [<empty>] to a number - it now does the following: [<empty>] - to string - "" - to number - 0 [<empty>, <empty>] - to string - "," - to number - NaN