From 1c49649df23d35f4633aac5a2bf67a90689715c6 Mon Sep 17 00:00:00 2001 From: Curtis Amoyaw Date: Tue, 19 Dec 2023 10:45:57 +0900 Subject: [PATCH] fix: Add optional chaining to prevent errors during access to property of undefined --- packages/core/src/init.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/init.ts b/packages/core/src/init.ts index 2815736f6b..f1304ad4a5 100644 --- a/packages/core/src/init.ts +++ b/packages/core/src/init.ts @@ -124,7 +124,7 @@ async function init(configuration = config): Promise { 'CornerstoneRender: Using detect-gpu to get the GPU benchmark:', config.gpuTier ); - if (config.gpuTier.tier < 1) { + if (config.gpuTier?.tier < 1) { console.log( 'CornerstoneRender: GPU is not powerful enough, using CPU rendering' );