1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-25 03:32:54 +01:00

use -1 as fallback in channel position sorting

This commit is contained in:
Puyodead1 2024-03-03 13:53:22 -05:00
parent ae44cce733
commit 4a79ae5b6b
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -132,7 +132,7 @@ export function hexToRGB(hex: string) {
} }
export function compareChannels(a: Channel, b: Channel): number { export function compareChannels(a: Channel, b: Channel): number {
return (a.position ?? 0) - (b.position ?? 0); return (a.position ?? -1) - (b.position ?? -1);
} }
export function doFit(width: number, height: number, maxWidth: number, maxHeight: number, minWidth = 0, minHeight = 0) { export function doFit(width: number, height: number, maxWidth: number, maxHeight: number, minWidth = 0, minHeight = 0) {