From b05ada3208db2540cd7cdf5cff247ef2b9b91e54 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 11 Apr 2018 16:11:53 +1000 Subject: [PATCH] Avoid console error in tests --- .../javascripts/discourse/components/composer-title.js.es6 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/components/composer-title.js.es6 b/app/assets/javascripts/discourse/components/composer-title.js.es6 index 23d5443b0c..9fc446930a 100644 --- a/app/assets/javascripts/discourse/components/composer-title.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-title.js.es6 @@ -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); }