We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a88f48 commit a228384Copy full SHA for a228384
1 file changed
src/components/ads/SimpleAd.tsx
@@ -26,13 +26,15 @@ export default function SimpleAd({
26
try {
27
// Push ad after a delay to ensure DOM is ready
28
setTimeout(() => {
29
- if (window && (window as any).adsbygoogle && adRef.current) {
+ if (window && adRef.current) {
30
+ (window as any).adsbygoogle = (window as any).adsbygoogle || [];
31
(window as any).adsbygoogle.push({});
32
initialized.current = true;
33
}
34
}, 500);
35
} catch (err) {
36
// Silently fail
37
+ console.error("AdSense Error:", err);
38
39
}, []);
40
0 commit comments