From 7b2e4170e9f882a7910fb642d4dc0bc406af95e7 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 12 Dec 2016 13:11:00 -0500 Subject: [PATCH] Safer checkUrl --- .../javascripts/discourse/components/composer-title.js.es6 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/discourse/components/composer-title.js.es6 b/app/assets/javascripts/discourse/components/composer-title.js.es6 index 1e0d6b75601..31d13d3f281 100644 --- a/app/assets/javascripts/discourse/components/composer-title.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-title.js.es6 @@ -51,6 +51,8 @@ export default Ember.Component.extend({ }, _checkForUrl() { + if (!this.element || this.isDestroying || this.isDestroyed) { return; } + if (this.get('isAbsoluteUrl') && (this.get('composer.reply')||"").length === 0) { // Try to onebox. If success, update post body and title.