Skip to content

[JsLIGO]: Bug in Automatic Semicolon Insertion related to if-else statement

As reported by Benjamin on #ligo-dev

The bug is a follows

//@entry
const approveOrganization = (org : organization, store : storage) => {
    if(Set.mem(Tezos.get_sender(),store.tezosOrganization.admins)) 
    return [list([]), {...store, organizations: Set.update(org,true,store.organizations)}];
    else return failwith("You need to be part of Tezos organization to activate an organization");
};

If the return is on the same line as if this works