From 4613e42b756da4513fd46ea8f7f23efd0cda4cbe Mon Sep 17 00:00:00 2001 From: Valentin Hutter <valentin@MacBook-Pro-de-Valentin.local> Date: Tue, 5 Dec 2023 14:13:26 +0100 Subject: [PATCH] fix: type issue - forgotten changes from daniel --- src/runtime/helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/helpers.ts b/src/runtime/helpers.ts index 5cd4f8fa..127356d9 100644 --- a/src/runtime/helpers.ts +++ b/src/runtime/helpers.ts @@ -73,10 +73,10 @@ export const jsonPointerGet = <TResult, T extends object = object>( for (let i = 0; i < refTokens.length; ++i) { const tok = refTokens[i] - if (!(typeof result === 'object' && tok in result)) { + if (!(typeof result === 'object' && result && tok in result)) { throw new Error('Invalid reference token: ' + tok) } - result = result[tok] + result = (result as any)[tok] } return result