mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 16:35:37 -05:00
Check if data is defined
Otherwise when adding a user as subadmin this would throw the following JS error: ``` users.js?v=bc2aae7…:500 Uncaught TypeError: Cannot read property 'message' of undefined(…)(anonymous function) @ users.js?v=bc2aae7…:500j @ jquery.js:3099fireWith @ jquery.js:3211x @ jquery.js:8264(anonymous function) @ jquery.js:8605 ``` Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
717fd9fdd6
commit
e827be759d
1 changed files with 1 additions and 1 deletions
|
|
@ -497,7 +497,7 @@ var UserList = {
|
|||
group: group
|
||||
},
|
||||
function (response) {
|
||||
if (response.data.message) {
|
||||
if (response.data !== undefined && response.data.message) {
|
||||
OC.Notification.show(response.data.message);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue