fix: return nullptr for getPrimaryMimeType() (#4569)

This commit is contained in:
Charles Kerr 2023-01-09 16:30:12 -06:00 committed by GitHub
parent 2b89ee508b
commit e4625cec0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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