Skip to content

Commit

Permalink
Merge pull request #5 from skilesare/main
Browse files Browse the repository at this point in the history
Updating
  • Loading branch information
skilesare committed Mar 28, 2022
2 parents ecd2cb0 + 7d11a49 commit 88de87b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/properties.mo
Original file line number Diff line number Diff line change
Expand Up @@ -166,26 +166,24 @@ module {



public func getClassProperty(val: CandyValue, name : Text) : Property{
public func getClassProperty(val: CandyValue, name : Text) : ?Property{

switch(val){
case(#Class(val)){
for(thisItem in val.vals()){
if(thisItem.name == name){
return thisItem;
return ?thisItem;
};
};
//couldnt find name in class
assert(false);
//unreachable
return {name=""; value=#Empty; immutable=true};

return null;

};
case(_){

assert(false);
//unreachable
return {name=""; value=#Empty; immutable=true};
return null;
}

};
Expand Down Expand Up @@ -230,7 +228,8 @@ module {
switch (m.get(q.name)) {
case (null) {
// Query contained an unknown property.
return #err(#NotFound);
//return #err(#NotFound);
//for now, ignore unfound properteis
};
case (? p) {
switch (p.value) {
Expand Down

0 comments on commit 88de87b

Please sign in to comment.