0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-05-19 23:40:07 +02:00

DEV: Stop using the deprecated text.cookAsync function

Dieser Commit ist enthalten in:
Andrei Prigorshnev 2023-10-09 21:03:51 +04:00
Ursprung 1ee2f7d8ba
Commit ed75e62ebc
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 185E0A5F45783902
2 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,7 @@
import Component from "@ember/component";
import { dasherize } from "@ember/string";
import discourseComputed from "discourse-common/utils/decorators";
import { cookAsync } from "discourse/lib/text";
import { cook } from "discourse/lib/text";
export default Component.extend({
classNameBindings: [
@ -14,7 +14,7 @@ export default Component.extend({
didReceiveAttrs() {
this._super(...arguments);
cookAsync(this.field.translatedDescription).then((cookedDescription) => {
cook(this.field.translatedDescription).then((cookedDescription) => {
this.set("cookedDescription", cookedDescription);
});
},

Datei anzeigen

@ -4,7 +4,7 @@ import I18n from "I18n";
import getUrl from "discourse-common/lib/get-url";
import { htmlSafe } from "@ember/template";
import { schedule } from "@ember/runloop";
import { cookAsync } from "discourse/lib/text";
import { cook } from "discourse/lib/text";
import CustomWizard, {
updateCachedWizard,
} from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard";
@ -25,10 +25,10 @@ export default Component.extend({
didReceiveAttrs() {
this._super(...arguments);
cookAsync(this.step.translatedTitle).then((cookedTitle) => {
cook(this.step.translatedTitle).then((cookedTitle) => {
this.set("cookedTitle", cookedTitle);
});
cookAsync(this.step.translatedDescription).then((cookedDescription) => {
cook(this.step.translatedDescription).then((cookedDescription) => {
this.set("cookedDescription", cookedDescription);
});
},