From e82b8c2b06f2fda1a6005befba81cab86a005d60 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 27 Feb 2023 10:27:32 +0000 Subject: [PATCH] DEV: Resolve and unsilence ember string prototype deprecation (#20448) --- .../discourse/app/pre-initializers/dynamic-route-builders.js | 5 +++-- .../javascripts/discourse/config/deprecation-workflow.js | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/app/pre-initializers/dynamic-route-builders.js b/app/assets/javascripts/discourse/app/pre-initializers/dynamic-route-builders.js index b5b91a832cd..635f39f481e 100644 --- a/app/assets/javascripts/discourse/app/pre-initializers/dynamic-route-builders.js +++ b/app/assets/javascripts/discourse/app/pre-initializers/dynamic-route-builders.js @@ -4,6 +4,7 @@ import TagShowRoute from "discourse/routes/tag-show"; import User from "discourse/models/user"; import buildCategoryRoute from "discourse/routes/build-category-route"; import buildTopicRoute from "discourse/routes/build-topic-route"; +import { dasherize } from "@ember/string"; export default { after: "inject-discourse-objects", @@ -39,7 +40,7 @@ export default { const site = Site.current(); site.get("filters").forEach((filter) => { - const filterDasherized = filter.dasherize(); + const filterDasherized = dasherize(filter); app.register( `controller:discovery.${filterDasherized}`, DiscoverySortableController.extend() @@ -106,7 +107,7 @@ export default { ); site.get("filters").forEach(function (filter) { - const filterDasherized = filter.dasherize(); + const filterDasherized = dasherize(filter); app.register( `route:tag.show-${filterDasherized}`, diff --git a/app/assets/javascripts/discourse/config/deprecation-workflow.js b/app/assets/javascripts/discourse/config/deprecation-workflow.js index f0763859a59..18f54854e58 100644 --- a/app/assets/javascripts/discourse/config/deprecation-workflow.js +++ b/app/assets/javascripts/discourse/config/deprecation-workflow.js @@ -4,7 +4,6 @@ globalThis.deprecationWorkflow.config = { // `throwOnUnhandled` here since it is easier to toggle. workflow: [ { handler: "silence", matchId: "ember-global" }, - { handler: "silence", matchId: "ember-string.prototype-extensions" }, { handler: "silence", matchId: "ember.built-in-components.reopen" }, { handler: "silence", matchId: "ember.built-in-components.import" }, { handler: "silence", matchId: "implicit-injections" },