From 43c84e958ea20fc7146365d2b05f344534f134e3 Mon Sep 17 00:00:00 2001 From: jobo322 Date: Tue, 12 Nov 2024 04:54:17 -0500 Subject: [PATCH] chore: keep original behavior of zonesNormalize --- src/zones/zonesNormalize.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/zones/zonesNormalize.ts b/src/zones/zonesNormalize.ts index 3720731f..f0b0e78a 100644 --- a/src/zones/zonesNormalize.ts +++ b/src/zones/zonesNormalize.ts @@ -50,6 +50,10 @@ export function zonesNormalize( return a.to - b.to; }); + if (zones.length === 0) { + zones.push({ from, to } as Zone); + } + for (const zone of zones) { if (from > zone.from) zone.from = from; if (to < zone.to) zone.to = to;