REFACTOR: Remove `_.compact`

REFACTOR: Remove _.compact

diff --git a/app/assets/javascripts/discourse/app/routes/tags-show.js b/app/assets/javascripts/discourse/app/routes/tags-show.js
index fdbd0ba..f934c26 100644
--- a/app/assets/javascripts/discourse/app/routes/tags-show.js
+++ b/app/assets/javascripts/discourse/app/routes/tags-show.js
@@ -195,15 +195,12 @@ export default DiscourseRoute.extend(FilterModeMixin, {
             // Pre-fill the tags input field
             if (controller.get("model.id")) {
               const composerModel = this.controllerFor("composer").get("model");
-
               composerModel.set(
                 "tags",
-                _.compact(
-                  _.flatten([
-                    controller.get("model.id"),
-                    controller.get("additionalTags")
-                  ])
-                )
+                [
+                  controller.get("model.id"),
+                  ...controller.get("additionalTags")
+                ].filter(Boolean)
               );
             }
           });
diff --git a/app/assets/javascripts/pretty-text/addon/emoji.js b/app/assets/javascripts/pretty-text/addon/emoji.js
index 8670107..f17fda9 100644
--- a/app/assets/javascripts/pretty-text/addon/emoji.js
+++ b/app/assets/javascripts/pretty-text/addon/emoji.js
@@ -253,7 +253,7 @@ export function emojiSearch(term, options) {
 }
 
 export function isSkinTonableEmoji(term) {
-  const match = _.compact(term.split(":"))[0];
+  const match = term.split(":").filter(Boolean)[0];
   if (match) {
     return tonableEmojis.indexOf(match) !== -1;
   }
diff --git a/app/assets/javascripts/pretty-text/addon/upload-short-url.js b/app/assets/javascripts/pretty-text/addon/upload-short-url.js
index a193b93..1664682 100644
--- a/app/assets/javascripts/pretty-text/addon/upload-short-url.js
+++ b/app/assets/javascripts/pretty-text/addon/upload-short-url.js
@@ -10,7 +10,7 @@ export function lookupCachedUploadUrl(shortUrl) {
 const MISSING = "missing";
 
 export function lookupUncachedUploadUrls(urls, ajax) {
-  urls = _.compact(urls);
+  urls = urls.filter(Boolean);
   if (urls.length === 0) {
     return;
   }

GitHub sha: 0da953b4

This commit appears in #10566 which was merged by eviltrout.