diff --git a/app/actions/dat-middleware.js b/app/actions/dat-middleware.js index 1c8cfd35..d953e10c 100644 --- a/app/actions/dat-middleware.js +++ b/app/actions/dat-middleware.js @@ -290,9 +290,7 @@ export default class DatMiddleware { }) } - async cancelDownloadDat (key) { - key = encode(key) - + async cancelDownloadDat ({ key }) { this.removeDatInternally(key) } @@ -305,6 +303,7 @@ export default class DatMiddleware { removeDatInternally (key) { const { dat } = this.dats[key] + if (!dat) return // maybe was deleted delete this.dats[key] if (dat.mirrorProgress) { dat.mirrorProgress.destroy() diff --git a/app/components/table-row.js b/app/components/table-row.js index 20961a3e..01368cd9 100644 --- a/app/components/table-row.js +++ b/app/components/table-row.js @@ -145,6 +145,7 @@ const Row = ({ updateTitle }) => { const { writable, metadata, key } = dat + if (!metadata) return null const { title } = metadata const placeholderTitle = `#${key}` return (