Skip to content

Commit

Permalink
Show isCompatibilityMode only if supported
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois authored and greggman committed Dec 22, 2023
1 parent f1bede2 commit 2d35cea
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,16 @@ function parseAdapterInfo(adapterInfo) {
);
}

function parseAdapterFlags(adapter) {
const flags = {
'isFallbackAdapter': adapter.isFallbackAdapter,
};
if ('isCompatibilityMode' in adapter) {
flags.isCompatibilityMode = adapter.isCompatibilityMode
}
return flags;
}

async function adapterToElements(adapter) {
if (!adapter) {
return;
Expand All @@ -303,10 +313,7 @@ async function adapterToElements(adapter) {
el('tr', {className: 'section'}, [
el('td', {colSpan: 2}, [createHeading('div', '-', 'flags:')]),
]),
...mapLikeToTableRows({
'isFallbackAdapter': adapter.isFallbackAdapter,
'isCompatibilityMode': adapter.isCompatibilityMode,
}),
...mapLikeToTableRows(parseAdapterFlags(adapter)),
limitsSectionElem,
...mapLikeToTableRows(markDifferencesInLimits(adapter)),
el('tr', {className: 'section'}, [
Expand Down

0 comments on commit 2d35cea

Please sign in to comment.