Commit 65612ae0 authored by Jason Salyers's avatar Jason Salyers
Browse files

Merge branch 'jsalyers-check-badge-type' into 'develop'

[JES] Add a check for proper badge type. Apparently the new hivefest badge...

See merge request !191
parents acfafe93 10eb9657
......@@ -40,6 +40,13 @@ class SubscriptionsList extends React.Component {
if (hivebuzzBadges) {
hivebuzzBadges.forEach(badge => {
const type = badge.get('type');
let valid = true;
if (
badgesTypes[type] === undefined ||
badgesTypes[type] === null
)
valid = false;
if (valid) {
badgesTypes[type].push(
<a
className="BadgesAchievements__badge_image"
......@@ -55,11 +62,19 @@ class SubscriptionsList extends React.Component {
/>
</a>
);
}
});
}
if (peakdBadges) {
peakdBadges.forEach(badge => {
const type = badge.get('type');
let valid = true;
if (
badgesTypes[type] === undefined ||
badgesTypes[type] === null
)
valid = false;
if (valid) {
badgesTypes[type].push(
<a
className="BadgesAchievements__badge_image"
......@@ -76,6 +91,7 @@ class SubscriptionsList extends React.Component {
/>
</a>
);
}
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment