mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Panels: avoid crash while switching between panels types (#35286)
This commit is contained in:
parent
64f5f91d44
commit
351400b82e
@ -198,7 +198,9 @@ export function restoreCustomOverrideRules(current: FieldConfigSource, old: Fiel
|
|||||||
if (isCustomFieldProp(prop)) {
|
if (isCustomFieldProp(prop)) {
|
||||||
const currentOverride = result.overrides.find((o) => isEqual(o.matcher, override.matcher));
|
const currentOverride = result.overrides.find((o) => isEqual(o.matcher, override.matcher));
|
||||||
if (currentOverride) {
|
if (currentOverride) {
|
||||||
|
if (currentOverride !== override) {
|
||||||
currentOverride.properties.push(prop);
|
currentOverride.properties.push(prop);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
result.overrides.push(override);
|
result.overrides.push(override);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user