Skip to content

Commit

Permalink
fix crashing sources && better getContent
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed Jan 11, 2023
1 parent ed1873c commit a202967
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Blocks/EmbedEEATableauBlock/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Edit = (props) => {

React.useEffect(() => {
props.getContent(data.vis_url, null, id);
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [data.vis_url]);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/Blocks/EmbedEEATableauBlock/View.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const View = (props) => {

React.useEffect(() => {
if (vis_url) {
props.getContent(vis_url, null);
props.getContent(vis_url, null, props.id);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [vis_url]);
Expand Down
21 changes: 11 additions & 10 deletions src/Sources/Sources.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ const SourcesWidget = ({ data }) => {
</a>
{expand && (
<ul>
{data.map((param, i) => (
<li key={i} className="embed-source-param">
<UniversalLink
className="embed-sources-param-title"
href={param.source_link}
>
{param.source}
</UniversalLink>
</li>
))}
{data &&
data.map((param, i) => (
<li key={i} className="embed-source-param">
<UniversalLink
className="embed-sources-param-title"
href={param.source_link}
>
{param.source}
</UniversalLink>
</li>
))}
</ul>
)}
</div>
Expand Down

0 comments on commit a202967

Please sign in to comment.