Skip to content

Commit 5a6b351

Browse files
committed
Fix font families that can be undefined
Fixes codesandbox#3710
1 parent 57a5d4c commit 5a6b351

File tree

1 file changed

+1
-1
lines changed
  • packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Explorer/ExternalResources

1 file changed

+1
-1
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Explorer/ExternalResources/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const getName = (resource: string) => {
162162
const getFontFamily = (search: string) => {
163163
const hashes = search.slice(search.indexOf('?') + 1).split('&');
164164
const family = hashes
165-
.find(hash => hash.split('=')[0] === 'family')
165+
.find(hash => hash && hash.split('=')[0] === 'family')
166166
.split('=')[1];
167167

168168
return {

0 commit comments

Comments
 (0)