From cd826595cd9cfee3b05c113f62772536dbbc026d Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Sun, 27 Jun 2021 15:33:56 +1000 Subject: [PATCH] Fix asset context asset undefined --- src/contexts/AssetsContext.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contexts/AssetsContext.js b/src/contexts/AssetsContext.js index b6ee893..4da276f 100644 --- a/src/contexts/AssetsContext.js +++ b/src/contexts/AssetsContext.js @@ -175,7 +175,7 @@ export function AssetURLsProvider({ children }) { setAssetURLs((prevURLs) => { let newURLs = { ...prevURLs }; for (let asset of assets) { - if (newURLs[asset.id].url === null) { + if (newURLs[asset.id]?.url === null) { newURLs[asset.id] = { ...newURLs[asset.id], url: URL.createObjectURL(