Avoid console error in tests

This commit is contained in:
Sam 2018-04-11 16:11:53 +10:00
parent bf2955cd98
commit b05ada3208

View File

@ -53,7 +53,11 @@ export default Ember.Component.extend({
if (this.get('autoPosted') || !this.get('watchForLink')) { return; }
if (Ember.testing) {
this._checkForUrl();
Em.run.next(() =>
// not ideal but we don't want to run this in current
// runloop to avoid an error in console
this._checkForUrl()
);
} else {
Ember.run.debounce(this, this._checkForUrl, 500);
}