From ed2f3f6e61b2f221e1530bf560aeb59443346c2c Mon Sep 17 00:00:00 2001 From: Ilya Konanykhin Date: Thu, 26 Jan 2017 15:50:47 +0600 Subject: [PATCH] Fix: alert "Fine" only once --- app/assets/javascripts/devise/registrations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/devise/registrations.js b/app/assets/javascripts/devise/registrations.js index 4d81ac5..5895aa8 100644 --- a/app/assets/javascripts/devise/registrations.js +++ b/app/assets/javascripts/devise/registrations.js @@ -22,7 +22,7 @@ $(document).ready(function(){ } if( contact_vals.length >= MIN_LEN || submit_count > MAX_SUBMITS){ - if( submit_count > MAX_SUBMITS ){ + if( submit_count == MAX_SUBMITS + 1 ){ alert("Fine."); } return true;