Skip to content

Commit

Permalink
Merge pull request #2159 from nextcloud/fix/2155/check-userid
Browse files Browse the repository at this point in the history
Check that userId is defined before querying
  • Loading branch information
Pytal authored Aug 5, 2021
2 parents 0ffff98 + bdf85ce commit eed31ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mixins/userStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export default {
* @returns {Promise<void>}
*/
async fetchUserStatus(userId) {
if (!userId) {
return
}
const capabilities = getCapabilities()
if (!Object.prototype.hasOwnProperty.call(capabilities, 'user_status') || !capabilities.user_status.enabled) {
return
Expand Down

0 comments on commit eed31ae

Please sign in to comment.