Skip to content

Commit 72f1909

Browse files
skjnldsvsusnux
andauthored
refactor: one line mime assignment
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
1 parent b41ce5f commit 72f1909

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/files/node.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ export abstract class Node {
182182
* Removing the mime type will set it to `application/octet-stream`
183183
*/
184184
set mime(mime: string|undefined) {
185-
if (mime === undefined) {
186-
mime = 'application/octet-stream'
187-
}
185+
mime ??= 'application/octet-stream'
188186

189187
validateData({ ...this._data, mime }, this._knownDavService)
190188
this._data.mime = mime

0 commit comments

Comments
 (0)