calling sAlert from within Meteor.call does not style based on config
twavis opened this issue · 2 comments
i have this...
Meteor.startup(function () {
sAlert.config({
effect: 'genie',
position: 'bottom-right',
timeout: 5000,
onRouteClose: false,
stack: true,
offset: '80px'
});
});
Which works perfectly.. except if I call sAlert from within a Meteor.call callback...
sAlert.warning("Submitting album...");
Meteor.call("createAlbum", newAlbumObj, function(error, result) {
if (error) {
sAlert.warning(error);
}
});
The first call, "Submitting album" is styled properly. The "error" message isn't. Everything I've tried from within the method callback does not style at all. Even with hard coded configOverwrite.
The error
is an object and you need a string here. You should probably return error.message
or error.reason
Try with these. You could 'console log' your error
object to see what's in it console.log(error)
Ahh man, thank you! Thanks for the awesome notifications package as well. The text was being displayed properly even when passing the object, it just messed up the styling... maybe could add a warning message in console if object is passed, instead of string?
Thanks again!