refactor: simplify l3

This commit is contained in:
Carlos Valente
2024-04-19 16:38:01 +02:00
committed by Carlos Valente
parent b14ac07568
commit dd81b92584
15 changed files with 81 additions and 120 deletions
@@ -41,10 +41,7 @@ export function isStringBoolean(text: string | null) {
* Considers custom fields
*/
export function getPropertyValue(event: OntimeEvent | null, property: MaybeString): string | undefined {
if (!event) {
return undefined;
}
if (typeof property !== 'string') {
if (!event || typeof property !== 'string' || property === 'none') {
return undefined;
}