11import Component from ' @glimmer/component' ;
22import { tracked } from ' @glimmer/tracking' ;
3- import { scheduleOnce } from ' @ember/runloop' ;
3+ import { schedule , scheduleOnce } from ' @ember/runloop' ;
44import Renderer from ' ember-mobiledoc-dom-renderer' ;
55import { getDocument } from ' ember-mobiledoc-dom-renderer/utils/document' ;
66import { guidFor } from ' @ember/object/internals' ;
@@ -324,7 +324,7 @@ export default class RenderMobiledocComponent extends Component<Signature> {
324324
325325 private addCard(card : CardRegistration ): void {
326326 // Defer mutation to after the current render to avoid updating a value during computation
327- scheduleOnce (' afterRender' , this , this ._addCard , card );
327+ schedule (' afterRender' , this , this ._addCard , card );
328328 }
329329
330330 private _addCard(card : CardRegistration ): void {
@@ -333,7 +333,7 @@ export default class RenderMobiledocComponent extends Component<Signature> {
333333
334334 private removeCard(card : CardRegistration ): void {
335335 // Defer mutation to after the current render to avoid updating a value during computation
336- scheduleOnce (' afterRender' , this , this ._removeCard , card );
336+ schedule (' afterRender' , this , this ._removeCard , card );
337337 }
338338
339339 private _removeCard(card : CardRegistration ): void {
@@ -344,7 +344,7 @@ export default class RenderMobiledocComponent extends Component<Signature> {
344344
345345 private addAtom(atom : AtomRegistration ): void {
346346 // Defer mutation to after the current render to avoid updating a value during computation
347- scheduleOnce (' afterRender' , this , this ._addAtom , atom );
347+ schedule (' afterRender' , this , this ._addAtom , atom );
348348 }
349349
350350 private _addAtom(atom : AtomRegistration ): void {
@@ -353,7 +353,7 @@ export default class RenderMobiledocComponent extends Component<Signature> {
353353
354354 private removeAtom(atom : AtomRegistration ): void {
355355 // Defer mutation to after the current render to avoid updating a value during computation
356- scheduleOnce (' afterRender' , this , this ._removeAtom , atom );
356+ schedule (' afterRender' , this , this ._removeAtom , atom );
357357 }
358358
359359 private _removeAtom(atom : AtomRegistration ): void {
0 commit comments