From f5ed8a983c2788e53b3423e2f7885bbb8dd1977c Mon Sep 17 00:00:00 2001 From: ksolow Date: Thu, 25 Jun 2026 11:45:42 +0300 Subject: [PATCH] fix parsing imei --- lib/units/device/plugins/service.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/units/device/plugins/service.ts b/lib/units/device/plugins/service.ts index 88ad78ebb..117482651 100644 --- a/lib/units/device/plugins/service.ts +++ b/lib/units/device/plugins/service.ts @@ -373,13 +373,19 @@ export default syrup.serial() if (!response.success) { throw new Error('Unable to get properties') } - const mapped = response.properties.reduce( + + const rawMapped = (response.properties || []).reduce( (acc: any, property: any) => { acc[property.name] = property.value return acc - }, {} + }, + {} ) + const mapped = rawMapped && typeof rawMapped === 'object' + ? rawMapped + : {} + if (mapped.imei) { return mapped }