Skip to content

Commit

Permalink
Replaced optional chaining operator by legacy JS
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianZ committed Jan 11, 2022
1 parent ebb313a commit 2762835
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions csstest.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,19 +417,19 @@ function runTests(filter = '') {

for (let spec in Specs) {
// Filter list of specifications
if (filter === 'stable' && Specs[spec]?.status?.stability !== 'stable') {
if (filter === 'stable' && Specs[spec].status && Specs[spec].status.stability !== 'stable') {
continue;
} else if (filter === 'experimental' && Specs[spec]?.status?.stability === 'stable') {
} else if (filter === 'experimental' && Specs[spec].status && Specs[spec].status.stability === 'stable') {
continue;
} else if (Number(filter) > 0) {
if (Specs[spec]?.status?.['first-snapshot'] === undefined) {
if (!Specs[spec].status || Specs[spec].status['first-snapshot'] === undefined) {
continue;
}

const snapshot = Number(filter);
if (
Specs[spec].status['first-snapshot'] > snapshot ||
Specs[spec]?.status?.['last-snapshot'] < snapshot
(Specs[spec].status && Specs[spec].status['last-snapshot'] < snapshot)
) {
continue;
}
Expand Down

0 comments on commit 2762835

Please sign in to comment.