Explorar o código

adjust nextTick fallback order - fix karma:safari unit test not passing

Evan You %!s(int64=12) %!d(string=hai) anos
pai
achega
a5f074f751
Modificáronse 1 ficheiros con 4 adicións e 7 borrados
  1. 4 7
      src/utils.js

+ 4 - 7
src/utils.js

@@ -5,13 +5,10 @@ var config    = require('./config'),
     console   = window.console,
     ViewModel // late def
 
-// PhantomJS doesn't support rAF, yet it has the global
-// variable exposed. Use setTimeout so tests can work.
-var defer = navigator.userAgent.indexOf('PhantomJS') > -1
-    ? window.setTimeout
-    : (window.webkitRequestAnimationFrame ||
-        window.requestAnimationFrame ||
-        window.setTimeout)
+var defer =
+    window.requestAnimationFrame ||
+    window.webkitRequestAnimationFrame ||
+    window.setTimeout
 
 /**
  *  Create a prototype-less object