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

pull/46305/head
Leon Sorokin 3 years ago committed by GitHub
parent 1bf605fa83
commit 0ee552dd65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/grafana-data/src/transformations/transformers/labelsToFields.ts
  2. 2
      public/app/features/dashboard/state/DashboardModel.ts
  3. 2
      public/app/plugins/panel/heatmap-new/module.tsx

@ -70,7 +70,7 @@ export const labelsToFieldsTransformer: SynchronousDataTransformerInfo<LabelsToF
continue; 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]); uniqueValues.add(field.labels[labelName]);
} }
} }

@ -965,7 +965,7 @@ export class DashboardModel implements TimeModel {
for (const panel of row.panels) { for (const panel of row.panels) {
// set the y gridPos if it wasn't already set // 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) // make sure y is adjusted (in case row moved while collapsed)
panel.gridPos.y -= yDiff; panel.gridPos.y -= yDiff;
// insert after row // insert after row

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

Loading…
Cancel
Save