diff --git a/seahub/templates/base_for_react.html b/seahub/templates/base_for_react.html index 12d0661365..8f1349df23 100644 --- a/seahub/templates/base_for_react.html +++ b/seahub/templates/base_for_react.html @@ -91,7 +91,7 @@ repoPasswordMinLength: {{repo_password_min_length}}, canAddPublicRepo: {% if can_add_public_repo %} true {% else %} false {% endif %}, canInvitePeople: {% if enable_guest_invitation and user.permissions.can_invite_guest %} true {% else %} false {% endif %}, - customNavItems: JSON.parse('{{ custom_nav_items | escapejs }}'), + customNavItems: {% if custom_nav_items %} JSON.parse('{{ custom_nav_items | escapejs }}') {% else %} {{'[]'}} {% endif %}, {% if request.user.is_authenticated and request.cur_note %} curNoteMsg: '{{ request.cur_note.message|urlize|escapejs }}',