From 5ae0a23f42d840812f9cb624495c966c7ef125d0 Mon Sep 17 00:00:00 2001 From: imccyu Date: Wed, 5 Aug 2026 01:31:26 +0800 Subject: [PATCH] fix(session): remove unreachable header guard --- packages/core/session/src/index.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/core/session/src/index.ts b/packages/core/session/src/index.ts index fe36162a22..590fb0d2ff 100644 --- a/packages/core/session/src/index.ts +++ b/packages/core/session/src/index.ts @@ -108,10 +108,6 @@ function validateSessionHeader(id: SessionId, input: unknown): SessionHeader { if (input === null || typeof input !== 'object' || Array.isArray(input)) { throw new Error('session header is not a plain JSON record') } - const prototype = Reflect.getPrototypeOf(input) - if (prototype !== Object.prototype && prototype !== null) { - throw new Error('session header is not a plain JSON record') - } const record = input as Record if (record.version !== SESSION_FORMAT_VERSION) { throw new Error(`session header version must be ${SESSION_FORMAT_VERSION}, got ${String(record.version)}`)