[polari/wip/fmuellner/tracker: 12/15] chatView: Shouldn't happen
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/fmuellner/tracker: 12/15] chatView: Shouldn't happen
- Date: Sun, 24 Feb 2019 13:42:13 +0000 (UTC)
commit a7c7808c3674b6d0280e5aa6457a5786a5894ef8
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jul 22 16:40:49 2016 +0200
chatView: Shouldn't happen
(Or rather: if there are no pending logs, isEnd() should have returned
true - needs investigation)
src/chatView.js | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/chatView.js b/src/chatView.js
index dcf6077..f604d0f 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -552,6 +552,9 @@ var ChatView = GObject.registerClass({
if (this._logWalker.isEnd())
return this._pendingLogs.splice(0);
+ if (this._pendingLogs.length == 0)
+ return [];
+
let nick = this._pendingLogs[0].get_sender();
let isAction = this._pendingLogs[0].is_action();
let maxNum = this._pendingLogs.length - this._initialPending.length;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]