5

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)

Pepe
  • 51
  • 4
  • 2
    Library was changed probably and your code is not compatible with it anymore (or some bug was introduced to the library), that is the problem with using CDN instead of downloading the file itself. – Matus Dubrava May 28 '18 at 08:35
  • It's likely a bug, but in this case it's because you're using `transform` - there's no real way to read the starting transform values, so you should really be using forcefeeding for it (at least until it's got the value in its cache). – Rycochet May 30 '18 at 13:47

1 Answers1

0

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

Rycochet
  • 2,690
  • 1
  • 19
  • 35
  • 9
    am still having the same issue on v2.0.5 `Cannot read property 'pattern' of undefined at tick` – ctf0 Aug 16 '18 at 15:36