diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-11-22 18:23:48 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-11-22 18:23:48 +0100 |
commit | e827be759d11fea60da975e24ae31006dad050df (patch) | |
tree | ee436627ba71fe251627a8e285ba1167f7650e32 /settings | |
parent | 717fd9fdd6b8e3246459690a3f5b3453461c724a (diff) | |
download | nextcloud-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.js | 2 |
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); } } |