Skip to content

Commit d2ceccf

Browse files
authored
fix Tasks removed from MapRoulette dashboard if all are marked as "Disabled" bug (#2727)
* fix Tasks removed from MapRoulette dashboard if all are marked as "Disabled" bug * Fix optional chaining for rule type check in ViewChallengeTasks component
1 parent 8f495cd commit d2ceccf

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/components/AdminPane/Manage/ViewChallengeTasks/ViewChallengeTasks.jsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ export class ViewChallengeTasks extends Component {
153153
// bounding box overlays on the map.
154154
findPriorityBounds = (challenge) => {
155155
const parseBoundsRule = (rule, priorityLevel, priorityBounds) => {
156-
if (rule.rules) {
156+
if (rule?.rules) {
157157
return rule.rules.map((r) => parseBoundsRule(r, priorityLevel, priorityBounds));
158158
}
159-
if (rule.type === "bounds") {
159+
if (rule?.type === "bounds") {
160160
return priorityBounds.push({
161161
boundingBox: rule.value.replace("location.", ""),
162162
priorityLevel,
@@ -193,16 +193,6 @@ export class ViewChallengeTasks extends Component {
193193
);
194194
}
195195

196-
if ((this.props.challenge?.actions?.total ?? 0) === 0) {
197-
return (
198-
<div className="mr-flex mr-justify-center mr-text-grey-lighter">
199-
<h3>
200-
<FormattedMessage {...messages.tasksNone} />
201-
</h3>
202-
</div>
203-
);
204-
}
205-
206196
if (this.state.bulkUpdating) {
207197
return (
208198
<div className="pane-loading">

0 commit comments

Comments
 (0)