Skip to content

Commit 508cc38

Browse files
authored
Merge pull request #23 from tc39/master
Normative: `ToInteger`: fix spec bug from tc39#1827 that allows (-1,0) to…
2 parents f175423 + 8e5ae7b commit 508cc38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4831,7 +4831,9 @@ <h1>ToInteger ( _argument_ )</h1>
48314831
1. Let _number_ be ? ToNumber(_argument_).
48324832
1. If _number_ is *NaN*, *+0*, or *-0*, return *+0*.
48334833
1. If _number_ is *+&infin;*, or *-&infin;*, return _number_.
4834-
1. Return the Number value that is the same sign as _number_ and whose magnitude is floor(abs(_number_)).
4834+
1. Let _integer_ be the Number value that is the same sign as _number_ and whose magnitude is floor(abs(_number_)).
4835+
1. If _integer_ is *-0*, return *+0*.
4836+
1. Return _integer_.
48354837
</emu-alg>
48364838
</emu-clause>
48374839

0 commit comments

Comments
 (0)