File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,11 @@ import Footer from '@theme-original/Footer'
44// import AdsContainerElement from '@site/src/components/AdsContainerElement'
55
66export default function FooterWrapper ( props ) {
7+ let shadoWindow = null
8+
79 useEffect ( ( ) => {
810 if ( typeof window !== 'undefined' ) {
11+ shadoWindow = window
912 const scriptElement = document . createElement ( 'script' )
1013 scriptElement . src =
1114 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7420210265158247'
@@ -23,7 +26,7 @@ export default function FooterWrapper(props) {
2326
2427 return (
2528 < >
26- { window && window . document . body . clientWidth <= 768 && (
29+ { shadoWindow && shadoWindow . document . body . clientWidth <= 768 && (
2730 < ins
2831 className = "adsbygoogle"
2932 style = { {
You can’t perform that action at this time.
0 commit comments