Skip to content

Commit 3944241

Browse files
committed
🔧 make clear buzz timeout disable
1 parent 5a270b0 commit 3944241

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ const buzz = (user) => {
6565
io.emit('buzzes', [...data.buzzes])
6666
console.log(`${user.name} buzzed in!`)
6767

68-
if (!data.clearTimeout) {
69-
data.clearTimeout = setTimeout(clear, parseInt(process.env.CLEAR_BUZZES_TIMEOUT) || 5000)
68+
if (!data.clearTimeout && process.env.CLEAR_BUZZES_TIMEOUT) {
69+
data.clearTimeout = setTimeout(clear, parseInt(process.env.CLEAR_BUZZES_TIMEOUT))
7070
}
7171
}
7272

0 commit comments

Comments
 (0)