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
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let propertiesAreComparable = false
|
||||||
|
|
||||||
for (let i = 0; i < otherRules.length; i++) {
|
for (let i = 0; i < otherRules.length; i++) {
|
||||||
let otherRule = otherRules[i]
|
let otherRule = otherRules[i]
|
||||||
let properties = getRuleProperties(otherRule)
|
let properties = getRuleProperties(otherRule)
|
||||||
|
if (info[i].properties.length > 0 && properties.length > 0) {
|
||||||
|
propertiesAreComparable = true
|
||||||
|
}
|
||||||
if (!equal(info[i].properties, properties)) {
|
if (!equal(info[i].properties, properties)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -94,6 +99,10 @@ export async function getCssConflictDiagnostics(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!propertiesAreComparable) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue