LegacyBrowser: fix Safari 13.1 (lacks logical nullish assignent) (#46260) (#46300)

(cherry picked from commit 0ee552dd65)
This commit is contained in:
Leon Sorokin
2022-03-07 12:36:49 -08:00
committed by GitHub
parent 711bfa8ae9
commit 94a794b315
2 changed files with 2 additions and 2 deletions
@@ -70,7 +70,7 @@ export const labelsToFieldsTransformer: SynchronousDataTransformerInfo<LabelsToF
continue;
}
const uniqueValues = (uniqueLabels[labelName] ||= new Set());
const uniqueValues = uniqueLabels[labelName] ?? (uniqueLabels[labelName] = new Set()); // (Safari 13.1 lacks ??= support)
uniqueValues.add(field.labels[labelName]);
}
}
@@ -962,7 +962,7 @@ export class DashboardModel {
for (const panel of row.panels) {
// set the y gridPos if it wasn't already set
panel.gridPos.y ??= row.gridPos.y;
panel.gridPos.y ?? (panel.gridPos.y = row.gridPos.y); // (Safari 13.1 lacks ??= support)
// make sure y is adjusted (in case row moved while collapsed)
panel.gridPos.y -= yDiff;
// insert after row