Editorial: Account for [[pattern]] etc. in AdjustDateTimeStyleFormat#3275
Editorial: Account for [[pattern]] etc. in AdjustDateTimeStyleFormat#3275
Conversation
|
cc @anba |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3275 +/- ##
=======================================
Coverage 98.09% 98.09%
=======================================
Files 22 22
Lines 10457 10457
Branches 1808 1808
=======================================
Hits 10258 10258
Misses 182 182
Partials 17 17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
If
to:
Because I don't think it's valid to refer to an internal slot using a String value. |
Based on Anba's suggestion: #3273 (comment) We pass a List of property names into AdjustDateTimeStyleFormat instead of a List of field names, so they can be compared directly with the "Property" column of the "Components of date and time formats" table. This avoids the problem of formats having other fields such as [[pattern]] and [[pattern12]] that would always conflict with the allowed fields. Co-Authored-By: André Bargull <andre.bargull@gmail.com>
d169a0c to
920fbb8
Compare
|
Good catch. I think we also technically need to check if baseFormat has a [[<prop>]] field before reading it. I've updated the PR. |
Based on Anba's suggestion: #3273 (comment)
We pass a List of property names into AdjustDateTimeStyleFormat instead of a List of field names, so they can be compared directly with the "Property" column of the "Components of date and time formats" table. This avoids the problem of formats having other fields such as [[pattern]] and [[pattern12]] that would always conflict with the allowed fields.