Skip to content

Node.js based forum software built for the modern web

refactor: use hasOwnProperty

Barış Soner Uşaklı9f1b8a3b1efb
diff --git a/public/src/utils.js b/public/src/utils.js
index fb0eed6c5f..86f799b63f 100644
--- a/public/src/utils.js
+++ b/public/src/utils.js
@@ -428,7 +428,7 @@
},
extensionToMimeType: function (extension) {
- return utils.extensionMimeTypeMap[extension] || '*';
+ return utils.extensionMimeTypeMap.hasOwnProperty('extension') ? utils.extensionMimeTypeMap[extension] : '*';
},
isPromise: function (object) {