mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 09:50:29 -06:00
Fix empty value for expiry date (#64893)
This commit is contained in:
parent
7860ca6c3d
commit
b3243486e8
@ -38,8 +38,10 @@ export const CreateTokenModal = ({ isOpen, token, serviceAccountLogin, onCreateT
|
||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||
|
||||
const maxExpirationDate = new Date();
|
||||
if (config.tokenExpirationDayLimit !== undefined) {
|
||||
if (config.tokenExpirationDayLimit !== undefined && config.tokenExpirationDayLimit > -1) {
|
||||
maxExpirationDate.setDate(maxExpirationDate.getDate() + config.tokenExpirationDayLimit + 1);
|
||||
} else {
|
||||
maxExpirationDate.setDate(8640000000000000);
|
||||
}
|
||||
const defaultExpirationDate = config.tokenExpirationDayLimit !== undefined && config.tokenExpirationDayLimit > 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user