Empty Sets Being Acted Upon

Empty Sets Being Acted Upon

Sincere apologies if this has been addressed elsewhere, I did try searching.

I've noticed a change in behaviour between 1.3.2 and 1.4.1 and I'm wondering if it's intentional, or something wrong with my code. I've noted this on two completely separate systems.

$("#myDiv").myFunctionName();

In 1.3.2 the above code would only execute if $("#myDiv") actually returned a DOM set containing elements. If there was nothing matched, nothing got executed. It seems that in 1.4.x however, myFunctionName() is called regardless. Thus, when the method attempts to make use of the 'this' object, this is null, as there were no matched elements, which obviously causes errors and script crashes.

Was this a deliberate change, or is something wrong?