Fix reader read-aloud races and add rows.Err checks
- reader.js: guard read-aloud against the loading placeholder (bodyReady) and invalidate stale speechSynthesis callbacks with a generation token - storage: check rows.Err() after iterating story-view/content-length reads - metrics: reuse placeholders() instead of duplicating the IN-clause builder
This commit is contained in:
@@ -438,6 +438,9 @@ func StoryContentLengths(ids []int64) map[int64]int {
|
||||
}
|
||||
out[id] = int(n)
|
||||
}
|
||||
if err := rows.Err(); err != nil {
|
||||
slog.Error("story content lengths iteration failed", "err", err)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user