From e435463051649d67bbcf2585f85bc261cd88da19 Mon Sep 17 00:00:00 2001 From: mattbyte <22878598+mattbyte@users.noreply.github.com> Date: Wed, 4 Dec 2024 02:04:30 +0800 Subject: [PATCH] Fix Bug in tuyaModernExtend Array containing an undefined is truthy. Correction to ensure value is falsy. --- src/lib/tuya.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/tuya.ts b/src/lib/tuya.ts index c86a5f3c0003b..9768cab662cc3 100644 --- a/src/lib/tuya.ts +++ b/src/lib/tuya.ts @@ -1808,7 +1808,7 @@ export function getHandlersForDP( : [ { key: [name], - endpoints: [endpoint], + endpoints: endpoint ? [endpoint] : undefined, convertSet: async (entity, key, value, meta) => { // A set converter is only called once; therefore we need to loop const state: KeyValue = {};