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

Error handling: generating a new keyword leads to erroneous status #1

Open
frolino opened this issue Jan 19, 2015 · 0 comments
Open

Comments

@frolino
Copy link

frolino commented Jan 19, 2015

How to replicate:

  1. Remove the contents of the "Number of words" box (i.e., make it blank)
  2. Click on "Generate a new key" (doesn't matter what's written in the big text box)

Expected behaviour: Either an error message, or a message that says "One of 1 possible 0-word permutations..."
Actual behaviour: A message that says "One of 1 possible -word permutations..." (with the number missing before "-word").

Possible fix: Define the "lastWordCount" variable in partials/phrases.html immediately (without waiting for getRandomWords() to execute). Or, don't make lastWordCount bound to the wordCount variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant