Skip to content

Commit

Permalink
chore: keep original behavior of zonesNormalize
Browse files Browse the repository at this point in the history
  • Loading branch information
jobo322 committed Nov 12, 2024
1 parent d176f2f commit 43c84e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/zones/zonesNormalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export function zonesNormalize<Zone extends FromTo = FromTo>(
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;
Expand Down

0 comments on commit 43c84e9

Please sign in to comment.