mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
fix: compilation issues from event-store (#3568)
## About the changes Reduce compilation errors on event-store
This commit is contained in:
parent
b1d73ba47c
commit
551c00b6b2
@ -109,6 +109,9 @@ class EventStore implements IEventStore {
|
||||
let count = await this.db(TABLE)
|
||||
.count<Record<string, number>>()
|
||||
.first();
|
||||
if (!count) {
|
||||
return 0;
|
||||
}
|
||||
if (typeof count.count === 'string') {
|
||||
return parseInt(count.count, 10);
|
||||
} else {
|
||||
@ -128,6 +131,9 @@ class EventStore implements IEventStore {
|
||||
query = query.andWhere({ feature_name: eventSearch.feature });
|
||||
}
|
||||
let count = await query.count().first();
|
||||
if (!count) {
|
||||
return 0;
|
||||
}
|
||||
if (typeof count.count === 'string') {
|
||||
return parseInt(count.count, 10);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user