DEV: Remove use of run-loop-dot-access (#17114)

Context: https://deprecations.emberjs.com/v3.x/#toc_deprecated-run-loop-and-computed-dot-access
This commit is contained in:
Isaac Janzen 2022-06-17 11:19:14 -05:00 committed by GitHub
parent 1f85eea64c
commit 6ad5db80de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -6,7 +6,7 @@ import { bufferedProperty } from "discourse/mixins/buffered-content";
import { popupAjaxError } from "discourse/lib/ajax-error";
import { propertyNotEqual } from "discourse/lib/computed";
import { equal, reads } from "@ember/object/computed";
import { run } from "@ember/runloop";
import { next } from "@ember/runloop";
import { action } from "@ember/object";
import getURL from "discourse-common/lib/get-url";
@ -33,7 +33,7 @@ export default Controller.extend(bufferedProperty("model"), {
// this is needed because the model doesnt have default values
// and as we are using a bufferedProperty it's not accessible
// in any other way
run.next(() => {
next(() => {
if (this.model) {
if (!this.model.badge_type_id) {
this.model.set(

View File

@ -2,7 +2,7 @@ import { A } from "@ember/array";
import Helper from "@ember/component/helper";
import { computed, get } from "@ember/object";
import { getOwner } from "@ember/application";
import { run } from "@ember/runloop";
import { join } from "@ember/runloop";
import { assert, runInDebug } from "@ember/debug";
function getCurrentRouteInfos(router) {
@ -40,7 +40,7 @@ export function routeAction(actionName, router, ...params) {
return function (...invocationArgs) {
let { action, handler } = getRouteWithAction(router, actionName);
let args = params.concat(invocationArgs);
return run.join(handler, action, ...args);
return join(handler, action, ...args);
};
}

View File

@ -1,5 +1,5 @@
import { isLegacyEmber } from "discourse-common/config/environment";
import { run } from "@ember/runloop";
import { begin, end } from "@ember/runloop";
import tippy from "tippy.js";
import { iconHTML } from "discourse-common/lib/icon-library";
@ -41,8 +41,8 @@ export function showPopover(event, options = {}) {
// hangs on legacy ember
if (!isLegacyEmber) {
run.begin();
instance.popper.addEventListener("transitionend", run.end, {
begin();
instance.popper.addEventListener("transitionend", end, {
once: true,
});
}