fix don't crash if settings are not passed in

v1.18.x
Baris Usakli 6 years ago
parent 7addc5a0e2
commit f8fa659642

@ -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]]'));
}

Loading…
Cancel
Save