Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
fix: published data url
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Aug 3, 2021
1 parent b91968a commit e3d5b0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/organisms/Published/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default (alias?: string) => {

const layers = useMemo<Layer[] | undefined>(
() =>
data?.layers.map(l => ({
data?.layers?.map(l => ({
id: l.id,
title: l.name || "",
pluginId: l.pluginId,
Expand Down Expand Up @@ -133,7 +133,7 @@ export default (alias?: string) => {
};

function dataUrl(alias?: string): string {
if (alias && window.location.hostname === "localhost" && window.REEARTH_CONFIG?.api) {
if (alias && window.REEARTH_CONFIG?.api) {
return `${window.REEARTH_CONFIG.api}/published_data/${alias}`;
}
return "data.json";
Expand Down

0 comments on commit e3d5b0f

Please sign in to comment.