File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,10 @@ const NativeComponent = () => {
115
115
.catch (console .error );
116
116
}, []);
117
117
118
+ if (! nativeAd ) {
119
+ return null ;
120
+ }
121
+
118
122
return (
119
123
<NativeAdView nativeAd = { nativeAd } >
120
124
// Components to display assets must be placed here
@@ -145,6 +149,10 @@ const NativeComponent = () => {
145
149
.catch (console .error );
146
150
}, []);
147
151
152
+ if (! nativeAd ) {
153
+ return null ;
154
+ }
155
+
148
156
return (
149
157
<NativeAdView nativeAd = { nativeAd } >
150
158
<NativeAsset assetType = { NativeAssetType .HEADLINE } >
@@ -230,6 +238,10 @@ const NativeComponent = () => {
230
238
.catch (console .error );
231
239
}, []);
232
240
241
+ if (! nativeAd ) {
242
+ return null ;
243
+ }
244
+
233
245
return (
234
246
// Wrap all the ad assets in the NativeAdView component, and register the view with the nativeAd prop
235
247
<NativeAdView nativeAd = { nativeAd } >
@@ -285,6 +297,10 @@ const NativeComponent = () => {
285
297
};
286
298
}, [nativeAd ]);
287
299
300
+ if (! nativeAd ) {
301
+ return null ;
302
+ }
303
+
288
304
return (
289
305
<NativeAdView nativeAd = { nativeAd } >
290
306
// Components to display assets must be placed here
@@ -316,6 +332,10 @@ const NativeComponent = () => {
316
332
};
317
333
}, [nativeAd ]);
318
334
335
+ if (! nativeAd ) {
336
+ return null ;
337
+ }
338
+
319
339
return (
320
340
<NativeAdView nativeAd = { nativeAd } >
321
341
// Components to display assets must be placed here
You can’t perform that action at this time.
0 commit comments