1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 21:26:53 +00:00

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

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;