Skip to content

Commit

Permalink
Fix usage of ES.CalendarEquals
Browse files Browse the repository at this point in the history
  • Loading branch information
justingrant authored and ptomato committed Oct 5, 2021
1 parent 1cde28d commit 2959043
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion polyfill/lib/plaindate.mjs
Expand Up @@ -267,7 +267,7 @@ export class PlainDate {
const val2 = GetSlot(other, slot);
if (val1 !== val2) return false;
}
return ES.CalendarEquals(this, other);
return ES.CalendarEquals(GetSlot(this, CALENDAR), GetSlot(other, CALENDAR));
}
toString(options = undefined) {
if (!ES.IsTemporalDate(this)) throw new TypeError('invalid receiver');
Expand Down
2 changes: 1 addition & 1 deletion polyfill/lib/plaindatetime.mjs
Expand Up @@ -593,7 +593,7 @@ export class PlainDateTime {
const val2 = GetSlot(other, slot);
if (val1 !== val2) return false;
}
return ES.CalendarEquals(this, other);
return ES.CalendarEquals(GetSlot(this, CALENDAR), GetSlot(other, CALENDAR));
}
toString(options = undefined) {
if (!ES.IsTemporalDateTime(this)) throw new TypeError('invalid receiver');
Expand Down
2 changes: 1 addition & 1 deletion polyfill/lib/plainmonthday.mjs
Expand Up @@ -72,7 +72,7 @@ export class PlainMonthDay {
const val2 = GetSlot(other, slot);
if (val1 !== val2) return false;
}
return ES.CalendarEquals(this, other);
return ES.CalendarEquals(GetSlot(this, CALENDAR), GetSlot(other, CALENDAR));
}
toString(options = undefined) {
if (!ES.IsTemporalMonthDay(this)) throw new TypeError('invalid receiver');
Expand Down
2 changes: 1 addition & 1 deletion polyfill/lib/plainyearmonth.mjs
Expand Up @@ -277,7 +277,7 @@ export class PlainYearMonth {
const val2 = GetSlot(other, slot);
if (val1 !== val2) return false;
}
return ES.CalendarEquals(this, other);
return ES.CalendarEquals(GetSlot(this, CALENDAR), GetSlot(other, CALENDAR));
}
toString(options = undefined) {
if (!ES.IsTemporalYearMonth(this)) throw new TypeError('invalid receiver');
Expand Down

0 comments on commit 2959043

Please sign in to comment.