Skip to content

Commit

Permalink
SAK-41067 - Don't do the ajax call if there's no user (not logged in) (
Browse files Browse the repository at this point in the history
  • Loading branch information
maurercw authored and Miguel Pellicer committed Apr 26, 2019
1 parent 84c4238 commit 0637652
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ if (portal.toolsCollapsed === undefined) {
}

portal.updateToolsCollapsedPref = function (collapsed) {

var url = '/direct/userPrefs/updateKey/' + portal.user.id + '/sakai:portal:sitenav?toolsCollapsed=' + collapsed;
$PBJQ.ajax(url, {method: 'PUT', cache: false});
if (portal.user.id) {
var url = '/direct/userPrefs/updateKey/' + portal.user.id + '/sakai:portal:sitenav?toolsCollapsed=' + collapsed;
$PBJQ.ajax(url, {method: 'PUT', cache: false});
}
};

portal.toggleMinimizeNav = function () {
Expand Down

0 comments on commit 0637652

Please sign in to comment.