diff --git a/examples/shopping-cart/api/shop.js b/examples/shopping-cart/api/shop.js index 5f3a53058..09d422d8c 100644 --- a/examples/shopping-cart/api/shop.js +++ b/examples/shopping-cart/api/shop.js @@ -15,7 +15,7 @@ export default { buyProducts (products, cb, errorCb) { setTimeout(() => { // simulate random checkout failure. - (Math.random() > 0.5 || navigator.userAgent.indexOf('PhantomJS') > -1) + (Math.random() > 0.5 || navigator.webdriver) ? cb() : errorCb() }, 100)