-
Notifications
You must be signed in to change notification settings - Fork 60
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
Precedent input when typing ↑ #13
Conversation
resources/assets/js/app.js
Outdated
input.addEventListener('keydown', event => { | ||
if (event.keyCode === 38) { | ||
input.value = history.getPrevious(); | ||
} else if (event.keyCode === 40) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you avoid else
by making using of early returns?
} | ||
} | ||
|
||
export default History; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this file end with a newline.
It should be good now |
I just added a limit to the stored history so they won't have any problems in the future. |
Closing this as it's already included in #20 |
As suggested here #5 , here is the PR :)