Fix asset context asset undefined

This commit is contained in:
Mitchell McCaffrey 2021-06-27 15:33:56 +10:00
parent 70cb5f8f89
commit cd826595cd

View File

@ -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(