Skip to content

Commit

Permalink
check if url parameter is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
bipoza committed Sep 6, 2021
1 parent 4a388ff commit 55f51a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/Blocks/MapViewer/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ const Edit = (props) => {
<>
<MapViewer
cfg={config}
url={props.properties.parent['@id'] + '/@mapviewer'}
url={
props.properties.parent
? props.properties.parent['@id'] + '/@mapviewer'
: null
}
customClass={getClassName(data)}
id={block}
// extraComponent={ExtraComponent ? <ExtraComponent /> : null}
Expand Down
2 changes: 1 addition & 1 deletion src/components/MapViewer/MapViewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MapViewer extends React.Component {
this.mapdiv = createRef();
this.mapCfg = props.cfg.Map;
this.compCfg = this.props.cfg.Components;
this.url = this.props.cfg.url;
this.url = this.props.cfg.url || ''; // Get url or default
this.map = null;
this.id = props.id;
this.mapClass = classNames('map-container', {
Expand Down

0 comments on commit 55f51a1

Please sign in to comment.