From 4ecd79f9e64dd387b822a37873b8a1185c7af26e Mon Sep 17 00:00:00 2001
From: David Lu <david.lu@hotmail.com>
Date: Mon, 18 Jul 2016 11:13:30 -0400
Subject: Added default to max users per team (#3602)

---
 webapp/components/admin_console/admin_settings.jsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'webapp/components/admin_console/admin_settings.jsx')

diff --git a/webapp/components/admin_console/admin_settings.jsx b/webapp/components/admin_console/admin_settings.jsx
index e29be33d1..eda2d1d8a 100644
--- a/webapp/components/admin_console/admin_settings.jsx
+++ b/webapp/components/admin_console/admin_settings.jsx
@@ -85,20 +85,26 @@ export default class AdminSettings extends React.Component {
         );
     }
 
-    parseInt(str) {
+    parseInt(str, defaultValue) {
         const n = parseInt(str, 10);
 
         if (isNaN(n)) {
+            if (defaultValue) {
+                return defaultValue;
+            }
             return 0;
         }
 
         return n;
     }
 
-    parseIntNonZero(str) {
+    parseIntNonZero(str, defaultValue) {
         const n = parseInt(str, 10);
 
         if (isNaN(n) || n < 1) {
+            if (defaultValue) {
+                return defaultValue;
+            }
             return 1;
         }
 
-- 
cgit v1.2.3-1-g7c22

