Skip to content

Commit

Permalink
fix: fix SSR prerender of disabled embed
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Apr 21, 2022
1 parent a15fec6 commit 67f3539
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/ConditionalEmbed/ConditionalEmbed.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const ConditionalEmbed = ({ code, url, children }) => {

//return value
let ret = <>{children}</>;

const embedDisabled =
urlReferenceConfig != null &&
!gdprPreferences[urlReferenceConfig.config_key];
Expand Down Expand Up @@ -108,6 +109,9 @@ const ConditionalEmbed = ({ code, url, children }) => {
);
}

if (__SERVER__) {
ret = <></>;
}
return ret;
};

Expand Down

0 comments on commit 67f3539

Please sign in to comment.