summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-11-22 18:23:48 +0100
committerLukas Reschke <lukas@statuscode.ch>2016-11-22 18:23:48 +0100
commite827be759d11fea60da975e24ae31006dad050df (patch)
treeee436627ba71fe251627a8e285ba1167f7650e32 /settings
parent717fd9fdd6b8e3246459690a3f5b3453461c724a (diff)
downloadnextcloud-server-e827be759d11fea60da975e24ae31006dad050df.tar.gz
nextcloud-server-e827be759d11fea60da975e24ae31006dad050df.zip
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>
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users/users.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 7e70d98f091..71defeaa18a 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -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);
}
}