Skip to content
This repository was archived by the owner on Feb 14, 2022. It is now read-only.

Commit d0cca01

Browse files
committed
fix object destructure syntax
1 parent 5966ff5 commit d0cca01

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

options_login.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ const userIdInput = document.getElementById('user_id')
88
const passwordInput = document.getElementById('password')
99

1010
const validate = () => {
11-
const { value: userId } = userIdInput
11+
const { value: user_id } = userIdInput
1212
const { value: password } = passwordInput
13-
const params = {
14-
user_id: userId,
15-
password: password,
16-
}
13+
const params = { user_id, password }
1714
const xhr = new XMLHttpRequest()
1815
xhr.open('POST', 'https://api.solved.ac/request_token.php', true)
1916
xhr.setRequestHeader('Content-type', 'application/json')

0 commit comments

Comments
 (0)