Issue
There is a crashing error in the layout when setting up the AppStore state for a fresh vendure deployment. If there is no list of available country codes the following check still passes as a truthy value is passed, so it ends up accessing a non existent 0 index. Instead should check values is defined and check that length is > 0.
Steps to reproduce
Deploy vendure server / worker with no countries
Deploy qwik starter site pointed at fresh api
Try to access qwik starter site and see error
Proposed Resolution
Add an additional check to ensure that the array is not empty before trying to access the first item.
Issue There is a crashing error in the layout when setting up the AppStore state for a fresh vendure deployment. If there is no list of available country codes the following check still passes as a truthy value is passed, so it ends up accessing a non existent 0 index. Instead should check values is defined and check that length is
> 0
.Steps to reproduce
Proposed Resolution Add an additional check to ensure that the array is not empty before trying to access the first item.
Reference src/routes/layout.tsx (Line 63)