diff --git a/src/adapters/adyoulike.js b/src/adapters/adyoulike.js index 3968de6ce8f1..7ee65eebe067 100644 --- a/src/adapters/adyoulike.js +++ b/src/adapters/adyoulike.js @@ -66,8 +66,17 @@ var AdyoulikeAdapter = function AdyoulikeAdapter() { Placements: placements, }; - if (performance && performance.navigation) { - body.PageRefreshed = performance.navigation.type === performance.navigation.TYPE_RELOAD; + // performance isn't supported by mobile safari iOS7. window.performance works, but + // evaluates to true on a unit test which expects false. + // + // try/catch was added to un-block the Prebid 0.25 release, but the adyoulike adapter + // maintainers should revisit this and see if it's really what they want. + try { + if (performance && performance.navigation) { + body.PageRefreshed = performance.navigation.type === performance.navigation.TYPE_RELOAD; + } + } catch (e) { + body.PageRefreshed = false; } return JSON.stringify(body);