Kia Ishii 5 лет назад
Родитель
Сommit
d601129082
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      examples/shopping-cart/api/shop.js

+ 1 - 1
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)