diff --git a/src/lib/polar/__tests__/client.test.ts b/src/lib/polar/__tests__/client.test.ts index 8618cd637..52179f387 100644 --- a/src/lib/polar/__tests__/client.test.ts +++ b/src/lib/polar/__tests__/client.test.ts @@ -460,9 +460,9 @@ describe("mapSpo2", () => { expect(mapped[0]?.externalId).toBe("spo2:1781059600:device-1"); }); it("rejects out-of-range readings", () => { - expect(mapSpo2({ test_time: 1_781_059_600, blood_oxygen_percent: 0 })).toEqual( - [], - ); + expect( + mapSpo2({ test_time: 1_781_059_600, blood_oxygen_percent: 0 }), + ).toEqual([]); expect( mapSpo2({ test_time: 1_781_059_600, blood_oxygen_percent: 120 }), ).toEqual([]); diff --git a/src/lib/polar/client.ts b/src/lib/polar/client.ts index bc488dd22..fe41c1ca6 100644 --- a/src/lib/polar/client.ts +++ b/src/lib/polar/client.ts @@ -268,10 +268,7 @@ async function fetchCollection( // 204 No Content — a window with no records. Polar returns an empty body. if (res.status === 204) return []; const json = (await res.json().catch(() => null)) as - | CollectionResult - | Record - | T[] - | null; + CollectionResult | Record | T[] | null; if (!json) return []; if (Array.isArray(json)) return json; if (!recordsKey) return [];