Skip to content

How2 crashes when pressing space while viewing a question with no answers #63

Open
luigimannoni opened this Issue · 1 comment

3 participants

@luigimannoni

Steps to reproduce:

  • Ask a question
  • Press space to see more choices
  • Find a question with no answers
  • Press space on the empty answer list

screen shot 2016-03-15 at 10 24 29

TypeError: Cannot read property 'body_markdown' of undefined
    at Object.showAnswer (/usr/local/lib/node_modules/how2/lib/ui.js:177:46)
    at /usr/local/lib/node_modules/how2/lib/how2.js:120:20
    at ScrollableBox.<anonymous> (/usr/local/lib/node_modules/how2/lib/ui.js:151:9)
    at ScrollableBox.EventEmitter._emit (/usr/local/lib/node_modules/how2/node_modules/blessed/lib/events.js:94:20)
    at ScrollableBox.EventEmitter.emit (/usr/local/lib/node_modules/how2/node_modules/blessed/lib/events.js:117:12)
    at ScrollableBox.List.enterSelected (/usr/local/lib/node_modules/how2/node_modules/blessed/lib/widgets/list.js:586:8)
    at ScrollableBox.<anonymous> (/usr/local/lib/node_modules/how2/lib/ui.js:155:21)
    at ScrollableBox.EventEmitter._emit (/usr/local/lib/node_modules/how2/node_modules/blessed/lib/events.js:94:20)
    at ScrollableBox.EventEmitter.emit (/usr/local/lib/node_modules/how2/node_modules/blessed/lib/events.js:117:12)
    at Program.<anonymous> (/usr/local/lib/node_modules/how2/node_modules/blessed/lib/widgets/screen.js:603:15)
@danyshaanan danyshaanan added a commit to danyshaanan/how2 that referenced this issue
@danyshaanan danyshaanan Fix crash on space in question without answers (#63) daf409f
@danyshaanan

Fix: #64

To reproduce the problem I used this question:

./bin/how2 docker compose create containers

(second question has no answers)

@santinic santinic closed this
@santinic santinic reopened this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.