Skip to content

Commit

Permalink
Fixed glayzzle#27: Class.getMethods returns array instead of object
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Stevens committed Aug 14, 2019
1 parent c21cf90 commit 547febd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nodes/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ Class.prototype.getProperties = function(includeParents) {
* Retrieves a list of methods
*/
Class.prototype.getMethods = function(includeParents) {
var result = {};
var result = [];
var methods = this._db.resolve(
this.get('methods')
);
if (methods) {
for(var i = 0; i < methods.length; i++) {
result[methods[i].name] = methods[i];
result.push(methods[i]);
}
}
if (includeParents) {
Expand All @@ -130,7 +130,7 @@ Class.prototype.getMethods = function(includeParents) {
var parentMethods = parent.getMethods(true);
for(var k in parentMethods) {
if (!(k in result)) {
result[k] = parentMethods[k];
result.push (parentMethods[k]);
}
}
}
Expand Down

0 comments on commit 547febd

Please sign in to comment.