1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-25 06:56:40 +07:00

fixed template handling

This commit is contained in:
Fedor Katurov 2021-05-26 11:05:23 +07:00
parent 1b6a586003
commit 116273cbab
2 changed files with 4 additions and 2 deletions

View file

@ -109,7 +109,9 @@ export class PostNewHandler extends VkEventHandler<Fields, Values> {
.slice(0, this.template.fields.images_limit) as string[];
const hasThumb =
this.template.fields.image && this.template.fields.images_limit;
!!this.template.fields.image &&
!!this.template.fields.images_limit &&
thumbs.length > 0;
if (hasThumb) {
if (this.template.fields.images_limit! <= 1) {