Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

use lodash

Blue Mouse558c7282de34
diff --git a/src/tg-integration/tg.update.ts b/src/tg-integration/tg.update.ts
index 2da407149..c6497794e 100644
--- a/src/tg-integration/tg.update.ts
+++ b/src/tg-integration/tg.update.ts
@@ -177,12 +177,12 @@ export class SwetrixUpdate {
const projects = await this.projectService.findWhere({ admin: user.id })
- if (projects.length === 0) {
+ if (_isEmpty(projects)) {
await ctx.reply('You have no projects yet.')
return
}
- const keyboard = projects.map(project => [
+ const keyboard = _map(projects, project => [
{
text: project.name,
callback_data: `project:${project.id}`,
@@ -210,12 +210,12 @@ export class SwetrixUpdate {
const projects = await this.projectService.findWhere({ admin: user.id })
- if (projects.length === 0) {
+ if (_isEmpty(projects)) {
await ctx.reply('You have no projects yet.')
return
}
- const keyboard = projects.map(project => [
+ const keyboard = _map(projects, project => [
{
text: project.name,
callback_data: `project:${project.id}`,