Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 24, 2020. It is now read-only.

Commit 7454677

Browse files
check on integer number on request
1 parent 4f60c84 commit 7454677

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎app.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ app.post('/update', (req, res) => {
3434
let total = JSON.parse(req.body.total);
3535
let first_connected = JSON.parse(req.body.first_connected);
3636

37-
if (typeof(touches) =='number' &&
38-
typeof(vibrs) =='number' &&
39-
typeof(total) =='number' &&
37+
if (Number.isInteger(touches) &&
38+
Number.isInteger(vibrs) &&
39+
Number.isInteger(total) &&
4040
typeof(first_connected) == 'boolean') {
4141

4242
if (first_connected) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /