Cannot read property 'pattern' error after velocity.js latest update (2.0.3)

佐手、 提交于 2019-12-24 03:14:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!