Fix diagnostic false-positive when no CSS properties are present (#793)
parent
53b81ca460
commit
22209f09c7
|
@ -82,9 +82,14 @@ export async function getCssConflictDiagnostics(
|
|||
return false
|
||||
}
|
||||
|
||||
let propertiesAreComparable = false
|
||||
|
||||
for (let i = 0; i < otherRules.length; i++) {
|
||||
let otherRule = otherRules[i]
|
||||
let properties = getRuleProperties(otherRule)
|
||||
if (info[i].properties.length > 0 && properties.length > 0) {
|
||||
propertiesAreComparable = true
|
||||
}
|
||||
if (!equal(info[i].properties, properties)) {
|
||||
return false
|
||||
}
|
||||
|
@ -94,6 +99,10 @@ export async function getCssConflictDiagnostics(
|
|||
}
|
||||
}
|
||||
|
||||
if (!propertiesAreComparable) {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue