Skip to content

Commit

Permalink
fix(controller/recommendation): fixing issue with types affecting build
Browse files Browse the repository at this point in the history
  • Loading branch information
korgon committed Mar 22, 2024
1 parent ba5cdeb commit 9a2007a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export class RecommendationController extends AbstractController {
},
addBundle: (e: MouseEvent, results: Product[]): BeaconEvent | undefined => {
if (!results.length || !this.store.profile.tag || this.store.profile.type != 'bundle') return;
const event: BeaconEvent = this.tracker.track.event({
const event: BeaconEvent | undefined = this.tracker.track.event({
type: BeaconType.PROFILE_ADDBUNDLE,
category: BeaconCategory.RECOMMENDATIONS,
context: this.config.globals.siteId ? { website: { trackingCode: this.config.globals.siteId } } : undefined,
Expand Down Expand Up @@ -315,7 +315,7 @@ export class RecommendationController extends AbstractController {
},
click: (e: MouseEvent): BeaconEvent | undefined => {
if (!this.store.profile.tag) return;
const event: BeaconEvent = this.tracker.track.event({
const event: BeaconEvent | undefined = this.tracker.track.event({
type: BeaconType.PROFILE_CLICK,
category: BeaconCategory.RECOMMENDATIONS,
context: this.config.globals.siteId ? { website: { trackingCode: this.config.globals.siteId } } : undefined,
Expand All @@ -341,7 +341,7 @@ export class RecommendationController extends AbstractController {
},
impression: (): BeaconEvent | undefined => {
if (!this.store.profile.tag || this.events.impression) return;
const event: BeaconEvent = this.tracker.track.event({
const event: BeaconEvent | undefined = this.tracker.track.event({
type: BeaconType.PROFILE_IMPRESSION,
category: BeaconCategory.RECOMMENDATIONS,
context: this.config.globals.siteId ? { website: { trackingCode: this.config.globals.siteId } } : undefined,
Expand All @@ -366,7 +366,7 @@ export class RecommendationController extends AbstractController {
},
render: (): BeaconEvent | undefined => {
if (!this.store.profile.tag || this.events.render) return;
const event: BeaconEvent = this.tracker.track.event({
const event: BeaconEvent | undefined = this.tracker.track.event({
type: BeaconType.PROFILE_RENDER,
category: BeaconCategory.RECOMMENDATIONS,
context: this.config.globals.siteId ? { website: { trackingCode: this.config.globals.siteId } } : undefined,
Expand Down

0 comments on commit 9a2007a

Please sign in to comment.