Skip to content

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

@frolino

Description

@frolino

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions