Skip to content
Snippets Groups Projects
Unverified Commit 0fcd5e7d authored by Alexander Lesnenko's avatar Alexander Lesnenko Committed by GitHub
Browse files

Fix broken pin map when there are no valid points (#18427)

parent 2a6d8133
Branches
Tags
No related merge requests found
......@@ -16,6 +16,8 @@ import L from "leaflet";
import type { VisualizationProps } from "metabase-types/types/Visualization";
const WORLD_BOUNDS = [[-90, -180], [90, 180]];
type Props = VisualizationProps;
type State = {
......@@ -159,7 +161,7 @@ export default class PinMap extends Component {
onUpdateWarnings(warnings);
}
const bounds = L.latLngBounds(points);
const bounds = L.latLngBounds(points.length > 0 ? points : WORLD_BOUNDS);
const min = d3.min(points, point => point[2]);
const max = d3.max(points, point => point[2]);
......
......@@ -52,7 +52,7 @@ const filter = {
const dashboardDetails = { name: "18061D", parameters: [filter] };
describe.skip("issue 18061", () => {
describe("issue 18061", () => {
beforeEach(() => {
mockSessionProperty("field-filter-operators-enabled?", true);
......@@ -108,7 +108,6 @@ describe.skip("issue 18061", () => {
cy.button("Update filter").click();
cy.wait("@getCard");
cy.findByText("Something went wrong").should("not.exist");
cy.findByText("ID is less than 2");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment