Skip to content

Commit

Permalink
hotfix svg export
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed Sep 15, 2023
1 parent f73ebe2 commit 6b6aaf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions taxonium_component/src/hooks/useLayers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ const useLayers = ({
getLineWidth: 0,
getRadius: main_scatter_layer.getRadius + settings.prettyStroke.width,
}
: {};
: null;

const fillin_scatter_layer = {
layerType: "ScatterplotLayer",
Expand Down Expand Up @@ -559,7 +559,7 @@ const useLayers = ({
[isCurrentlyOutsideBounds]
);

const processedLayers = layers.map((layer) => {
const processedLayers = layers.filter(x=> x!==null).map((layer) => {
if (layer.layerType === "ScatterplotLayer") {
return new ScatterplotLayer(layer);
}
Expand All @@ -578,7 +578,7 @@ const useLayers = ({
console.log("could not map layer spec for ", layer);
});

const { triggerSVGdownload } = getSVGfunction(layers, viewState);
const { triggerSVGdownload } = getSVGfunction(layers.filter(x=> x!==null), viewState);

return { layers: processedLayers, layerFilter, keyStuff, triggerSVGdownload };
};
Expand Down

1 comment on commit 6b6aaf8

@vercel
Copy link

@vercel vercel bot commented on 6b6aaf8 Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.