Skip to content

Commit

Permalink
Fix :number operating on a ResolvedValue that is a string representin…
Browse files Browse the repository at this point in the history
…g a number (#66)
  • Loading branch information
lucacasonato authored Jul 25, 2024
1 parent eff61a0 commit 1b27b75
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,14 @@ contributors: Eemeli Aro
1. Let _source_ be ! Get(_funcCtx_, *"source"*).
1. Let _opts_ be OrdinaryObjectCreate(%Object.prototype%).
1. Perform ! CreateDataPropertyOrThrow(_opt_, *"localeMatcher"*, _localeMatcher_).
1. If Type(_input_) is String, then
1. Set _input_ to ? Call(JSON.parse, %JSON%, « _input_ »).
1. Else if Type(_input_) is Object, then
1. If Type(_input_) is Object, then
1. Let _valueOf_ be ? Get(_input_, *"valueOf"*).
1. If IsCallable(_valueOf_) is *true*, then
1. Let _inputOptions_ be ? Get(_input_, *"options"*).
1. Perform ? Call(Object.assign, *undefined*, « _opts_, _inputOptions_ »).
1. Set _input_ to ? Call(_valueOf_, _input_).
1. If Type(_input_) is String, then
1. Set _input_ to ? Call(JSON.parse, %JSON%, « _input_ »).
1. If Type(_input_) is not Number or BigInt, throw a *TypeError* exception.
1. Let _numberOptions_ be « *"minimumIntegerDigits"*, *"minimumFractionDigits"*, *"maximumFractionDigits"*, *"minimumSignificantDigits"*, *"maximumSignificantDigits"*, *"roundingIncrement"* ».
1. Let _booleanOptions_ be « *"useGrouping"* ».
Expand Down

0 comments on commit 1b27b75

Please sign in to comment.