Skip to content

Commit

Permalink
ACTIONSCRIPT: In getMember check also super class
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius authored and DrMcCoy committed Feb 23, 2019
1 parent d5ba982 commit eef1987
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/aurora/actionscript/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ Variable Object::getMember(const Variable &id) {
throw Common::Exception("Object::getMember id is not a string");

const Common::UString idString = id.asString();
if (_members.find(idString) != _members.end())

std::map<Common::UString, Variable>::iterator iter = _members.find("constructor");
if (hasMember(idString) && iter != _members.end() && iter->second.asObject()->hasMember(idString))
return iter->second.asObject()->getMember(id);
else if (_members.find(idString) != _members.end())
return _members[idString];
else {
_members.insert(std::make_pair(idString, ObjectPtr(new Object)));
Expand Down

0 comments on commit eef1987

Please sign in to comment.