diff options
author | David Lu <david.lu@hotmail.com> | 2016-07-18 11:13:30 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-07-18 11:13:30 -0400 |
commit | 4ecd79f9e64dd387b822a37873b8a1185c7af26e (patch) | |
tree | 561888d16cbb57f8d5fb3e01fd437226cd6e18fc /webapp/components/admin_console/admin_settings.jsx | |
parent | 4e16ea32e385799dfef34e4c9528239ba71dbf7f (diff) | |
download | chat-4ecd79f9e64dd387b822a37873b8a1185c7af26e.tar.gz chat-4ecd79f9e64dd387b822a37873b8a1185c7af26e.tar.bz2 chat-4ecd79f9e64dd387b822a37873b8a1185c7af26e.zip |
Added default to max users per team (#3602)
Diffstat (limited to 'webapp/components/admin_console/admin_settings.jsx')
-rw-r--r-- | webapp/components/admin_console/admin_settings.jsx | 10 |
1 files changed, 8 insertions, 2 deletions
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; } |