Skip to content

Commit

Permalink
Always use adapter info
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois authored Oct 8, 2024
1 parent f2ed3ab commit f577c6d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'}, [
Expand Down Expand Up @@ -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:')]),
]),
Expand Down

0 comments on commit f577c6d

Please sign in to comment.