DEV: Remove 'classify' string prototype extensions (#16739)

Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
This commit is contained in:
Isaac Janzen 2022-05-12 13:17:59 -05:00 committed by GitHub
parent 324a89c9d6
commit 88b34172af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import Component from "@ember/component";
import I18n from "I18n";
import { ajax } from "discourse/lib/ajax";
import bootbox from "bootbox";
import { dasherize } from "@ember/string";
import { classify, dasherize } from "@ember/string";
import discourseComputed, { bind } from "discourse-common/utils/decorators";
import optionalService from "discourse/lib/optional-service";
import { popupAjaxError } from "discourse/lib/ajax-error";
@ -168,7 +168,7 @@ export default Component.extend({
};
if (action.client_action) {
let actionMethod = this[`client${action.client_action.classify()}`];
let actionMethod = this[`client${classify(action.client_action)}`];
if (actionMethod) {
return actionMethod.call(this, reviewable, performAction);
} else {

View File

@ -11,6 +11,7 @@ import discourseComputed, { bind } from "discourse-common/utils/decorators";
import { not } from "@ember/object/computed";
import optionalService from "discourse/lib/optional-service";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { classify } from "@ember/string";
export default Controller.extend(ModalFunctionality, {
adminTools: optionalService(),
@ -225,7 +226,7 @@ export default Controller.extend(ModalFunctionality, {
};
if (action.client_action) {
let actionMethod = this[`client${action.client_action.classify()}`];
let actionMethod = this[`client${classify(action.client_action)}`];
if (actionMethod) {
return actionMethod.call(this, () =>
performAction({ skipClose: true })