From e4625cec0bc809741fcd534ceac562991afd88f4 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 9 Jan 2023 16:30:12 -0600 Subject: [PATCH] fix: return nullptr for getPrimaryMimeType() (#4569) --- web/src/torrent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/torrent.js b/web/src/torrent.js index d155420ce..a496e98be 100644 --- a/web/src/torrent.js +++ b/web/src/torrent.js @@ -200,7 +200,7 @@ export class Torrent extends EventTarget { return this.fields.pieceSize; } getPrimaryMimeType() { - return this.fields['primary-mime-type']; + return this.fields['primary-mime-type'] || 'application/octet-stream'; } getPrivateFlag() { return this.fields.isPrivate;