check alarm for type first. fixes #679

This commit is contained in:
Daniel Poelzleithner 2022-11-11 20:05:09 +01:00
parent d779eb434f
commit e831ad6945
1 changed files with 1 additions and 1 deletions

View File

@ -6207,7 +6207,7 @@ function runner.getAlarm
) )
if a == nil then error( 'got nil alarm' ) end if a == nil then error( 'got nil alarm' ) end
if alarm == true or not a if (type(alarm) == "boolean" and alarm == true) or not a
then then
-- 'alarm' is already immediate or -- 'alarm' is already immediate or
-- a not a new alarm -- a not a new alarm