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

This commit is contained in:
Leon Sorokin
2022-03-07 09:21:28 -06:00
committed by GitHub
parent 1bf605fa83
commit 0ee552dd65
3 changed files with 3 additions and 3 deletions

View File

@ -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]);
}
}

View File

@ -965,7 +965,7 @@ export class DashboardModel implements TimeModel {
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

View File

@ -169,7 +169,7 @@ export const plugin = new PanelPlugin<PanelOptions, GraphFieldConfig>(HeatmapPan
.addNumberInput({
path: 'hideThreshold',
name: 'Hide cell counts <=',
defaultValue: 0.000_000_001, // 1e-9
defaultValue: 1e-9,
category,
})
.addSliderInput({