Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: web/inc/logdog-stream-view/model.ts

Issue 2969643003: [web] Update packages, use TS 2.4 (Closed)
Patch Set: [web] Update packages, use TS 2.4 Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « web/apps/gulp-common.js ('k') | web/inc/luci-operation/operation.ts » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: web/inc/logdog-stream-view/model.ts
diff --git a/web/inc/logdog-stream-view/model.ts b/web/inc/logdog-stream-view/model.ts
index f242bd49135b496f519f43f6a78895a6a62e4d37..643db15bc753d4152d7ac7a280ee07183004df9f 100644
--- a/web/inc/logdog-stream-view/model.ts
+++ b/web/inc/logdog-stream-view/model.ts
@@ -540,7 +540,7 @@ namespace LogDog {
// Clear our fetching status.
this.rendering = true;
this.loadingState = LoadingState.RENDERING;
- let hasLogs = !!(buf && buf.peek());
+ let hasLogs = !!(buf.peek());
// Resolve any previous rendering Promise that we have. This
// makes sure our rendering and fetching don't get more than
@@ -959,7 +959,7 @@ namespace LogDog {
if (this.finished) {
// Our HEAD region has met/surpassed our TAIL region, so there are no
// HEAD logs to return. Only bottom.
- return null;
+ return [];
}
// If we have a tail pointer, only fetch HEAD up to that point.
@@ -1222,7 +1222,7 @@ namespace LogDog {
if (!this.active.length) {
// No active streams, so we're finished. Permanently set our promise to
// the finished state.
- return;
+ return new BufferedLogs(null);
}
let buffers: BufferedLogs[];
@@ -1235,8 +1235,7 @@ namespace LogDog {
return this._aggregateBuffers(buffers);
}
- private async ensureActiveBuffers(op: luci.Operation):
- Promise<BufferedLogs[]|null> {
+ private async ensureActiveBuffers(op: luci.Operation) {
// Fill all buffers for all active streams. This may result in an RPC to
// load new buffer content for streams whose buffers are empty.
await Promise.all(this.active.map((entry) => entry.ensure(op)));
« no previous file with comments | « web/apps/gulp-common.js ('k') | web/inc/luci-operation/operation.ts » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698