Skip to content

Commit 50b67f4

Browse files
justingrantMs2ger
authored andcommitted
ObjectCreate+CopyDataProperties=>CopyOptions
Replaces a use of `ObjectCreate` followed by `CopyDataProperties` with `CopyOptions`. This pattern is used everywhere else in Temporal but was missed in #2484.
1 parent 31656b1 commit 50b67f4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

polyfill/lib/ecmascript.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4735,8 +4735,7 @@ export function AddDurationToOrSubtractDurationFromPlainYearMonth(operation, yea
47354735
const calendar = GetSlot(yearMonth, CALENDAR);
47364736
const fieldNames = CalendarFields(calendar, ['monthCode', 'year']);
47374737
const fields = PrepareTemporalFields(yearMonth, fieldNames, []);
4738-
const fieldsCopy = ObjectCreate(null);
4739-
CopyDataProperties(fieldsCopy, fields, []);
4738+
const fieldsCopy = CopyOptions(fields);
47404739
fields.day = 1;
47414740
let startDate = CalendarDateFromFields(calendar, fields);
47424741
const sign = DurationSign(years, months, weeks, days, 0, 0, 0, 0, 0, 0);

0 commit comments

Comments
 (0)