Fixed message quote failing if there is no active editor instance
authorAlexander Ebert <ebert@woltlab.com>
Fri, 14 Aug 2015 12:53:56 +0000 (14:53 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 14 Aug 2015 12:53:56 +0000 (14:53 +0200)
wcfsetup/install/files/js/WCF.Message.js

index 1da687b6888c41c3058e85dd548850f9d67691fb..21fb22f4b4c96b9dbd80d73c006102baa69d3d5a 100644 (file)
@@ -2866,7 +2866,7 @@ WCF.Message.Quote.Manager = Class.extend({
                                        }
                                }
                                
-                               if (insert) this._editorElement.redactor('wbbcode.insertQuoteBBCode', $username, $link, $quote, $quote);
+                               if (insert && this._editorElement.length) this._editorElement.redactor('wbbcode.insertQuoteBBCode', $username, $link, $quote, $quote);
                        }
                        else {
                                this._editorElementAlternative.redactor('wbbcode.insertQuoteBBCode', $username, $link, $quote, $quote);