jQuery(...).size is not a function

We have added sentry to our site, now get bazillion of errors like “jQuery(…).size is not a function” and what is bad about that is that it is impossible to reproduce, even if there is no desired elements on page code will still work.

@alexandrm – why is it impossible to reproduce? Does your application use jQuery?

Why: because size is a method from jQuery proto, you may run jQuery('anything not existed on page').size() without troubles it will return number of found nodes, I just can not imagine how may it be that there is such error and how to reproduce it so asking community, may be other got into same issue

Will try tips for reducing javascript error noise, hope that will help, especially inbound filters, may be problems caught by crawlers

$().size is deprecated in 1.8 and removed in 3.0.
Use .length instead of.size()
Reference: https://api.jquery.com/size/