mirror of
https://github.com/zoriya/flood.git
synced 2025-12-06 07:16:18 +00:00
historyService: check if this.snapshots[snapshot] is defined
This commit is contained in:
@@ -128,7 +128,7 @@ class HistoryService extends BaseService<HistoryServiceEvents> {
|
||||
}
|
||||
|
||||
getHistory({snapshot}: {snapshot: HistorySnapshot}, callback: (data: TransferHistory | null, error?: Error) => void) {
|
||||
this.snapshots[snapshot].getData((transferSnapshots, error) => {
|
||||
this.snapshots[snapshot]?.getData((transferSnapshots, error) => {
|
||||
if (error || transferSnapshots == null) {
|
||||
callback(null, error);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user