Fix: [ALAS] Handle None in interval_clear()

This commit is contained in:
LmeSzinc 2023-07-02 15:19:28 +08:00
parent a078c14f25
commit b1048748d0

View File

@ -212,6 +212,7 @@ class ModuleBase:
self.interval_reset(b, interval) self.interval_reset(b, interval)
return return
if button is not None:
if button.name in self.interval_timer: if button.name in self.interval_timer:
self.interval_timer[button.name].reset() self.interval_timer[button.name].reset()
else: else:
@ -223,6 +224,7 @@ class ModuleBase:
self.interval_clear(b, interval) self.interval_clear(b, interval)
return return
if button is not None:
if button.name in self.interval_timer: if button.name in self.interval_timer:
self.interval_timer[button.name].clear() self.interval_timer[button.name].clear()
else: else: