Skip to content

Commit f599460

Browse files
author
Maledong
authored
zh-CN: add the missing '[]' for 'username' (#3991)
Because 'username' is a variable instead of a property name, we cannot use it by referring with '.', a "[]" is needed here.
1 parent 27edde3 commit f599460

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

locale/zh-cn/docs/guides/simple-profiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ app.get('/newUser', (req, res) => {
2626

2727
username = username.replace(/[!@#$%^&*]/g, '');
2828

29-
if (!username || !password || !users.username) {
29+
if (!username || !password || !users[username]) {
3030
return res.sendStatus(400);
3131
}
3232

0 commit comments

Comments
 (0)