Ensure from and to plan icons aren't overridden with default icon in Activity Feed

refs: https://github.com/TryGhost/Team/issues/1373

- moved the icon variable for subscription_event to avoid it overriding the if statements
This commit is contained in:
James Morris 2022-02-15 16:07:28 +00:00
parent 30f7892de8
commit da9c15f7b5

View File

@ -49,6 +49,8 @@ function getIcon(event) {
}
if (event.type === 'subscription_event') {
icon = 'started-subscription';
if (event.data.from_plan === null) {
icon = 'started-subscription';
}
@ -56,8 +58,6 @@ function getIcon(event) {
if (event.data.to_plan === null) {
icon = 'canceled-subscription';
}
icon = 'started-subscription';
}
if (event.type === 'email_opened_event') {