FIX: _.include is no longer imported from lodash

FIX: _.include is no longer imported from lodash

Instead use toArray and indexOf which is also clearer

diff --git a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6 b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6
index 9ca0eed..809adbf 100644
--- a/app/assets/javascripts/discourse/lib/safari-hacks.js.es6
+++ b/app/assets/javascripts/discourse/lib/safari-hacks.js.es6
@@ -99,7 +99,13 @@ function positioningWorkaround($fixedElement) {
   };
 
   var blurredNow = function(evt) {
-    if (!done && _.include($(document.activeElement).parents(), fixedElement)) {
+    if (
+      !done &&
+      $(document.activeElement)
+        .parents()
+        .toArray()
+        .indexOf(fixedElement) > -1
+    ) {
       // something in focus so skip
       return;
     }

GitHub sha: 25137554

1 Like