Update sort

This commit is contained in:
0x1eef 2024-08-31 00:46:48 -03:00
parent cfce51e29c
commit a5f66044e1
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ import { formatNumber } from "~/lib/t";
pkg.fonts.forEach((f) => document.fonts.add(f)); pkg.fonts.forEach((f) => document.fonts.add(f));
pkg.css.forEach((s) => document.head.appendChild(s)); pkg.css.forEach((s) => document.head.appendChild(s));
pkg.scripts pkg.scripts
.sort((s) => Number(s.id)) .sort((a,b) => Number(a.id) - Number(b.id))
.forEach((s) => { .forEach((s) => {
document.body.removeChild(document.body.appendChild(s)); document.body.removeChild(document.body.appendChild(s));
}); });

View file

@ -42,7 +42,7 @@ import { formatNumber } from "~/lib/t";
pkg.css.forEach((s) => document.head.appendChild(s)); pkg.css.forEach((s) => document.head.appendChild(s));
pkg.json.forEach((o) => document.body.appendChild(o)); pkg.json.forEach((o) => document.body.appendChild(o));
pkg.scripts pkg.scripts
.sort((s) => Number(s.id)) .sort((a,b) => Number(a.id) - Number(b.id))
.forEach((s) => { .forEach((s) => {
document.body.removeChild(document.body.appendChild(s)); document.body.removeChild(document.body.appendChild(s));
}); });