Skip to content

Commit

Permalink
for test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstinalin committed Dec 2, 2024
1 parent a3b7f64 commit ab2cd5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/amo/components/InstallWarning/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class InstallWarningBase extends React.Component<InternalProps> {
!correctedLocation &&
isFirefox({ userAgentInfo }) &&
addon.type === ADDON_TYPE_EXTENSION &&
promotedCategories.some(
promotedCategories.every(
(promoted) => !EXCLUDE_WARNING_CATEGORIES.includes(promoted),
)
);
Expand Down
5 changes: 4 additions & 1 deletion src/amo/installAddon.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,10 @@ export class WithInstallHelpers extends React.Component<WithInstallHelpersIntern
// If the add-on is trusted, send an additional event for trusted
// add-on install.
const promotedCategories = _getPromotedCategories({ addon, clientApp });
if (addon.type === ADDON_TYPE_EXTENSION && promotedCategories) {
if (
addon.type === ADDON_TYPE_EXTENSION &&
promotedCategories.length > 0
) {
_tracking.sendEvent({
action: promotedCategories.join(', '),
category: INSTALL_TRUSTED_EXTENSION_CATEGORY,
Expand Down

0 comments on commit ab2cd5f

Please sign in to comment.