vicb/bsmSelect

addItemTarget: 'original' sort order not preserved

fhellwig opened this issue · 1 comments

On line 42, the jQuery data('bsm-order') return value is strictly checked against null instead of undefined.

The result is that the data-bsm-order attribute is never set.

Per the jQuery API for the .data(key) method:

If no data at all was set on that element, undefined is returned.

Suggested fix:

if (typeof $(o).data('bsm-order') === 'undefined') {...

Thank you,

Frank

vicb commented

Good catch, I'll push a fix. Thanks.