From 79b21ee8a8062dd53cc652ff5999f6cff216c178 Mon Sep 17 00:00:00 2001 From: crStiv Date: Tue, 25 Feb 2025 17:45:55 +0100 Subject: [PATCH] Update compatibility.ts --- packages/json-rpc/src/compatibility.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/json-rpc/src/compatibility.ts b/packages/json-rpc/src/compatibility.ts index 11777d88fd..3ef1cbba2d 100644 --- a/packages/json-rpc/src/compatibility.ts +++ b/packages/json-rpc/src/compatibility.ts @@ -54,18 +54,18 @@ export function isJsonCompatibleArray(value: unknown): value is JsonCompatibleAr return true; } -export function isJsonCompatibleDictionary(data: unknown): data is JsonCompatibleDictionary { - if (typeof data !== "object" || data === null) { - // data must be a non-null object +export function isJsonCompatibleDictionary(value: unknown): value is JsonCompatibleDictionary { + if (typeof value !== "object" || value === null) { + // value must be a non-null object return false; } // Exclude special kind of objects like Array, Date or Uint8Array // Object.prototype.toString() returns a specified value: // http://www.ecma-international.org/ecma-262/7.0/index.html#sec-object.prototype.tostring - if (Object.prototype.toString.call(data) !== "[object Object]") { + if (Object.prototype.toString.call(value) !== "[object Object]") { return false; } - return Object.values(data).every(isJsonCompatibleValue); + return Object.values(value).every(isJsonCompatibleValue); }