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

Website Simulator Alert for Number of Nodes Check is Off-by-One #636

Closed
justinTM opened this issue Oct 1, 2021 · 0 comments · Fixed by #637
Closed

Website Simulator Alert for Number of Nodes Check is Off-by-One #636

justinTM opened this issue Oct 1, 2021 · 0 comments · Fixed by #637

Comments

@justinTM
Copy link
Contributor

justinTM commented Oct 1, 2021

Hi All!

Simple UI bug: in the Serf Convergence Simulator, when you specify the integer number of nodes as 1, an alert pops up saying You must specify at least 1 node!, which is simply off by one.

This HTML element: <input type="text" id="nodes" value="30" class="simulator-input">

This script logic (line 11378):

return isNaN(t) || 1 >= t ? void alert("Must have at least one node!") : (simulator.nodes = t, void simulator.draw())

I believe simply needs to become:

return isNaN(t) || 2 > t ? void alert("Must have at least one node!") : (simulator.nodes = t, void simulator.draw())

Tada! simple :)

@justinTM justinTM changed the title Simulator alert for Number of Nodes is of-by-one Simulator Alert for Number of Nodes Check is Off-by-One Oct 1, 2021
@justinTM justinTM changed the title Simulator Alert for Number of Nodes Check is Off-by-One Website Simulator Alert for Number of Nodes Check is Off-by-One Oct 1, 2021
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

Successfully merging a pull request may close this issue.

1 participant