Add polyfill for toSorted Fixes #2827

80d27273a2208c553f877051bf31d1a8faf3d81a

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +6 -0Showing whitespace changes
public/lib/polyfill.js+6 -0
@@ -11,3 +11,9 @@ if (!Array.prototype.findLastIndex) {
11 return -1;11 return -1;
12 };12 };
13}13}
14
15if (!Array.prototype.toSorted) {
16 Array.prototype.toSorted = function (compareFunction) {
17 return this.slice().sort(compareFunction);
18 };
19}