Skip to content

class is not applied when providing dynamic message #45

@Muphet

Description

@Muphet

i am trying to show alert after method returns error. When i provide err message and apply it to bert.alert, class of that alert is not applied at all (switches to default fixed-top info whatever it is). When i change err to string, it suddenly works fine.

Meteor.call('invite', user, (err, res) => {
        if(err)
          Bert.alert(err, 'warning', 'fixed-top');
});

server:

invite: function(user){
 if(invited(user)){
  let err = "user already invited";
  throw new Meteor.Error(err);
 }
 return;
}

any idea why class is not displayed? or better way of triggering alerts on method error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions