Небольшие правки. Добавил тесты на новый функционал от crackosok

This commit is contained in:
LightAir
2020-12-01 23:49:41 +03:00
parent 3d5258a6c7
commit 9864d6408a
5 changed files with 33 additions and 8 deletions

View File

@@ -73,7 +73,7 @@ function items(items, channel) {
if (item.goals.length > 0) {
item.goals.forEach(goal => item_values.push({
"turbo:goal": {
'turbo:goal': {
_attr: {
type: goal.type || 'yandex',
'turbo-goal-id': goal.id,
@@ -81,7 +81,7 @@ function items(items, channel) {
id: goal.counter_id,
}
}
}))
}));
}
item_values.push({'turbo:content': {_cdata: fullContent}});
@@ -143,7 +143,7 @@ function itemData(data) {
turboSource: data.turboSource || '',
turboTopic: data.turboTopic || '',
goals: data.goals || [],
turboEnabled: data.turboEnabled || true,
turboEnabled: data.turboEnabled !== undefined ? data.turboEnabled: true,
};
}
/**