Remove some dead code in notification:reset_timeout()

This code is inside an "if new_timeout and [something else]". Thus, it
only executes when new_timeout is "truthy". Thus, "new_timeout or
[whatever]" will always evaluate to "new_timeout".

This commit removes that tiny bit of dead code.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2019-09-21 13:43:35 +02:00
parent dc98eade3b
commit fb151c3340
1 changed files with 1 additions and 1 deletions

View File

@ -467,7 +467,7 @@ function notification:reset_timeout(new_timeout)
-- Do not set `self.timeout` to `self.timeout` since that would create the
-- timer before the constructor ends.
if new_timeout and self.timer then
self.timeout = new_timeout or self.timeout
self.timeout = new_timeout
end
if self.timer and not self.timer.started then