Commit d69145e
committed
Don't call valueOf during string concatenation
The new Temporal (https://github.com/tc39/proposal-temporal)
date/time API (currently stage 3)
will throw when calling `valueOf` on instances of most Temporal types.
This behavior breaks react-dom's rendering of Temporal instances because
the current implementation relies on the `+` operator which calls
`valueOf`.
This commit uses String.concat (like Babel does) instead of `+`, which
avoids this problem.1 parent e9b2028 commit d69145e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments