From 32c01038e0e8b183f966b3759bddb5452ae752da Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 14 Jan 2020 22:16:41 +0000 Subject: [PATCH] `FacebookInstantGamesPlugin.showAd` and `showVideo` will now break out of the ad iteration search once a valid ad has been found and called. Previously, it would carry on interating if the async didn't complete quickly. Fix #4888 --- plugins/fbinstant/src/FacebookInstantGamesPlugin.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/fbinstant/src/FacebookInstantGamesPlugin.js b/plugins/fbinstant/src/FacebookInstantGamesPlugin.js index 98639eb28..4332132e9 100644 --- a/plugins/fbinstant/src/FacebookInstantGamesPlugin.js +++ b/plugins/fbinstant/src/FacebookInstantGamesPlugin.js @@ -2148,6 +2148,8 @@ var FacebookInstantGamesPlugin = new Class({ _this.emit('adshowerror', e, ad); }); + + break; } } @@ -2197,6 +2199,8 @@ var FacebookInstantGamesPlugin = new Class({ _this.emit('adshowerror', e, ad); }); + + break; } }