Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 2026a83

Browse files
committed
Small optimization of the code
1 parent 497a389 commit 2026a83

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/js/app/challenge-details/js/controllers/challenge-details-controller.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -331,15 +331,8 @@
331331

332332
vm.challenge.url = window.location.href;
333333

334-
vm.isRegistered = true;
335-
if (regList.indexOf(handle) == -1) {
336-
vm.isRegistered = false;
337-
}
338-
339-
var hasSubmitted = false;
340-
if (submitters.indexOf(handle) >= 0) {
341-
hasSubmitted = true;
342-
}
334+
vm.isRegistered = regList.indexOf(handle) >= 0;
335+
var hasSubmitted = submitters.indexOf(handle) >= 0;
343336

344337
// If the challenge is active and in the registration phase we allow either
345338
// registration, or unregistration.

0 commit comments

Comments
 (0)