Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

js: Convert _.isFunction to typeof.

Anders Kaseorg42931e69e616
diff --git a/static/js/notifications.js b/static/js/notifications.js
index 1ea5dbfeab1..9db139c57cf 100644
--- a/static/js/notifications.js
+++ b/static/js/notifications.js
@@ -1,5 +1,4 @@
import $ from "jquery";
-import _ from "lodash";
import render_compose_notification from "../templates/compose_notification.hbs";
@@ -324,7 +323,7 @@ export function process_notification(notification) {
message_id: message.id,
});
- if (_.isFunction(notification_object.addEventListener)) {
+ if (typeof notification_object.addEventListener === "function") {
// Sadly, some third-party Electron apps like Franz/Ferdi
// misimplement the Notification API not inheriting from
// EventTarget. This results in addEventListener being