musictheory / NilScript

Objective-C-style language superset of JavaScript with a tiny, simple runtime
Other
50 stars 5 forks source link

oj.getClassList: Array.append should be replaced by .push. #50

Closed IngwiePhoenix closed 9 years ago

IngwiePhoenix commented 9 years ago

I just wanted to see what I can do with oj.getClassList. Turns out it has a bug.

> console.log(oj.getClassList.toString())
function getClassList()
{
    var results = [ ];

    for (var key in _classNameToClassMap) { if (hop(_classNameToClassMap, key)) {
        results.append(_classNameToClassMap[key]);
        ^^^^^^^^^^^^^^ Should use .push(...)
    }}

    return results;
}
IngwiePhoenix commented 9 years ago

This issue still exists and I wonder why... o.o Could you fix it? I am currently needing to Array.prototype.append = Array.prototype.push...which is pretty nasty. :P

iccir commented 9 years ago

Sorry about that! Published to npm as 1.1.3