mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
fix don't crash if settings are not passed in
This commit is contained in:
@@ -219,7 +219,7 @@ function toggleFollow(method, uid, theiruid, callback) {
|
||||
}
|
||||
|
||||
SocketUser.saveSettings = function (socket, data, callback) {
|
||||
if (!socket.uid || !data) {
|
||||
if (!socket.uid || !data || !data.settings) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user