-->

Cannot read property 'pattern' error after

2019-07-12 19:46发布

问题:

My code worked until yesterday:

<script src="//cdn.jsdelivr.net/npm/velocity-animate@2.0/velocity.min.js"></script>

$('[id^=home-layer-]').velocity({
    transform: 'scale(2)'
}, {
    duration: duration,
    easing: "ease-out",
    loop: false
});

Now I'm getting an error:

Uncaught TypeError: Cannot read property 'pattern' of undefined at ut (velocity.min.js:632)

回答1:

It was a bug that slipped in with the new Sequences code when animating a property that reported a 0px value to start with - which should have been treated the same as 0 and wasn't.

Currently fixed on master, and will be in 2.0.5