This project is archived and is in readonly mode.

#899 ✓resolved
Oskar Krawczyk

els|array.getLast() working differently in 1.2 and 1.3

Reported by Oskar Krawczyk | April 30th, 2010 @ 02:04 PM | in 1.3.0 rc2 (closed)

Not exactly a bug, but still interesting:

<ul id="list">
    <li><a href="#">Lorem</a></li>
    <li><a href="#">Lorem</a></li>
    <li><a href="#">Lorem</a></li>
    <li><a href="#">Lorem</a></li>
    <li><a href="#">Lorem</a></li>
</ul>

and

$('list').getElements('li').getLast();

MooTools 1.2 returns:

<li>

While MooTools 1.3 returns:

[a #, a #, a #, a #, a #]

I prefer the 1.3 way - more logical, but I believe compatibility should be kept between 1.2 and 1.3.

Test case: http://jsfiddle.net/A5T9W/3/

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Tags

Referenced by

Pages