问题
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
来源:https://stackoverflow.com/questions/50562190/cannot-read-property-pattern-error-after-velocity-js-latest-update-2-0-3