Fixed 'Uncaught ReferenceError'

When using snabbdom with webpack, the webpack output file is in strict mode, and that would cause error:

> Uncaught ReferenceError: requestAnimationFrame is not defined at ...

This pull request fixed it.
pull/48/head
chenxsan 9 years ago
parent 81016ead29
commit 7ba68b9a24

@ -1,4 +1,4 @@
var raf = requestAnimationFrame || setTimeout;
var raf = (window && window.requestAnimationFrame) || setTimeout;
var nextFrame = function(fn) { raf(function() { raf(fn); }); };
function setNextFrame(obj, prop, val) {

Loading…
Cancel
Save