From f577c6d379349161e299705ca3a6852962f00608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Tue, 8 Oct 2024 12:48:00 +0200 Subject: [PATCH] Always use adapter info --- index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.js b/index.js index 76a06d2..961ad87 100644 --- a/index.js +++ b/index.js @@ -316,8 +316,6 @@ async function adapterToElements(adapter) { if (!adapter) { return; } - // UGH! - const adapterInfo = adapter.info || await (adapter.requestAdapterInfo ? adapter.requestAdapterInfo() : undefined); const device = await adapter.requestDevice() || {} const limitsSectionElem = el('tr', {className: 'section'}, [ @@ -347,7 +345,7 @@ async function adapterToElements(adapter) { el('tr', {className: 'section'}, [ el('td', {colSpan: 2}, [createHeading('div', '-', 'adapter info:')]), ]), - ...mapLikeToTableRows(parseAdapterInfo(adapterInfo)), + ...mapLikeToTableRows(parseAdapterInfo(adapter.info)), el('tr', {className: 'section'}, [ el('td', {colSpan: 2}, [createHeading('div', '-', 'flags:')]), ]),