mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
clean seen errors before reporting invitation status
This commit is contained in:
parent
46a3c97c60
commit
f5464ecf7f
1 changed files with 4 additions and 1 deletions
|
@ -25,16 +25,19 @@ var scrollUp = function(){
|
|||
AutoForm.hooks({
|
||||
inviteForm: {
|
||||
onSuccess: function(operation, result, template) {
|
||||
clearSeenErrors();
|
||||
|
||||
if(result && result.newUser){
|
||||
throwError('Almost there. Please give your friend a sign up link to get in.');
|
||||
} else {
|
||||
throwError('Thank you!');
|
||||
}
|
||||
|
||||
scrollUp();
|
||||
},
|
||||
|
||||
onError: function(operation, error, template) {
|
||||
clearSeenErrors();
|
||||
|
||||
if(error && error.reason){
|
||||
throwError(error.reason);
|
||||
scrollUp();
|
||||
|
|
Loading…
Add table
Reference in a new issue