]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Fix issue 76 (/clear breaks window switching).
authorChris Porter <redacted>
Sat, 25 Jul 2009 22:41:54 +0000 (23:41 +0100)
committerChris Porter <redacted>
Sat, 25 Jul 2009 22:41:54 +0000 (23:41 +0100)
js/ui/baseuiwindow.js

index 9dcb7a2209474dbf5b61ff760ca87d8ff3432e46..0307f1252c4e2fc5b11b4e02779b860eed76a699 100644 (file)
@@ -233,7 +233,11 @@ qwebirc.ui.Window = new Class({
       if(!this.lastPositionLineInserted) {
         this.scrollAdd(this.lastPositionLine);
       } else if(this.lines.lastChild != this.lastPositionLine) {
-        this.lines.removeChild(this.lastPositionLine);
+        try {
+          this.lines.removeChild(this.lastPositionLine);
+        } catch(e) {
+          /* IGNORE, /clear removes lastPositionLine from the dom without resetting it. */
+        }
         this.scrollAdd(this.lastPositionLine);
       }
     } else {