mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 15:34:16 +08:00
Avoid console error in tests
This commit is contained in:
parent
bf2955cd98
commit
b05ada3208
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user