mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +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) {
|
SocketUser.saveSettings = function (socket, data, callback) {
|
||||||
if (!socket.uid || !data) {
|
if (!socket.uid || !data || !data.settings) {
|
||||||
return callback(new Error('[[error:invalid-data]]'));
|
return callback(new Error('[[error:invalid-data]]'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user