mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Prevent acces to undefined variable.
This commit is contained in:
parent
b17f1ebdce
commit
04cd9dfbf5
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@
|
||||||
app.get('#/', function (c) {
|
app.get('#/', function (c) {
|
||||||
c.api('/users', function(data) {
|
c.api('/users', function(data) {
|
||||||
// Warn admin if no users are created.
|
// Warn admin if no users are created.
|
||||||
if (data.users.length === 0) {
|
if (typeof data.users !== 'undefined' && data.users.length === 0) {
|
||||||
c.flash('warning', y18n.t('warning_first_user'));
|
c.flash('warning', y18n.t('warning_first_user'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue