removed sorting by id (#3305)

This commit is contained in:
Andrey Babushkin 2025-04-15 13:32:53 +02:00 committed by GitHub
parent 1b9c568cb1
commit 80a7817e7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -347,6 +347,7 @@ const DOMMessages = [
MType.CreateIFrameDocument,
];
// fixed times: 3
function brokenDomSorter(m1: PlayerMsg, m2: PlayerMsg) {
if (m1.time !== m2.time) return m1.time - m2.time;
@ -357,10 +358,10 @@ function brokenDomSorter(m1: PlayerMsg, m2: PlayerMsg) {
const m1IsDOM = DOMMessages.includes(m1.tp);
const m2IsDOM = DOMMessages.includes(m2.tp);
if (m1IsDOM && m2IsDOM) {
// @ts-ignore DOM msg has id but checking for 'id' in m is expensive
return m1.id - m2.id;
}
// if (m1IsDOM && m2IsDOM) {
// // @ts-ignore DOM msg has id but checking for 'id' in m is expensive
// return m1.id - m2.id;
// }
if (m1IsDOM && !m2IsDOM) return -1;
if (!m1IsDOM && m2IsDOM) return 1;