Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOOK 1191 - Fix bug involving event statuses not being properly read #38

Open
wants to merge 4 commits into
base: BOOK-769-Sportsbook
Choose a base branch
from

Conversation

MuffinLightning
Copy link
Contributor

No description provided.

@MuffinLightning MuffinLightning added the bug Something isn't working label Apr 9, 2019
@MuffinLightning MuffinLightning self-assigned this Apr 9, 2019
mseaward added a commit that referenced this pull request Apr 10, 2019
@@ -5,7 +5,7 @@ const EventStatus = {
FINISHED: 'finished',
CANCELED: 'canceled',
SETTLED: 'settled',
COMPLETED: 'completed'
COMPLETED: 'completed',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no dangling commas 😛

case EventStatus.CANCELED:
return false;
default:
return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this not do the same thing with less code?

if (!eventStatus) {
    return true;
} else {
  let status = eventStatus;

  if (eventStatus.constructor === Array) { // Err Handling, in case data does not come as an array.
    status = eventStatus[1];
  }

  return false;
}

pbsa-github pushed a commit that referenced this pull request Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants