Skip to content

Commit

Permalink
moar
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Jul 2, 2024
1 parent 9ff4535 commit f35645a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/logcat.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class Logcat extends EventEmitter {
const result = [];
/** @type {number?} */
let recentLogIndex = null;
for (const [index, [message, timestamp]] of this.logs.entries()) {
for (const [index, [message, timestamp]] of /** @type {Generator} */ (this.logs.rentries())) {
if (this.logIndexSinceLastRequest && index > this.logIndexSinceLastRequest
|| !this.logIndexSinceLastRequest) {
recentLogIndex = index;
Expand All @@ -242,7 +242,7 @@ class Logcat extends EventEmitter {
getAllLogs () {
/** @type {LogEntry[]} */
const result = [];
for (const [message, timestamp] of this.logs.values()) {
for (const [message, timestamp] of /** @type {Generator} */ (this.logs.rvalues())) {
result.push(toLogEntry(message, timestamp));
}
return result;
Expand Down

0 comments on commit f35645a

Please sign in to comment.