Fix syntax

This commit is contained in:
Urban Rotnik 2020-10-30 13:37:59 +01:00
parent b94a3a6cb8
commit 042231469c
3 changed files with 2 additions and 4 deletions

View file

@ -226,7 +226,7 @@ class ProjectsController < ApplicationController
end
def dt_state_load
render json: { state: current_team.current_view_state(current_user).state.dig('projects', 'table') }
render json: { state: current_team&.current_view_state(current_user)&.state&.dig('projects', 'table') }
end
private

View file

@ -1,7 +1,7 @@
<% provide(:head_title, t("projects.index.head_title")) %>
<% if current_team %>
<%= render partial: "shared/sidebar", locals: {page: 'project'} %>
<%= render partial: "shared/sidebar", locals: { page: 'project' } %>
<%= render partial: "shared/secondary_navigation" %>
<span style="display: none;" data-hook="projects-index-html"></span>

View file

@ -1,5 +1,3 @@
<% if can_create_projects?(current_team) %>
<div class="modal" id="new-project-modal" tabindex="-1" role="dialog" aria-labelledby="new-project-modal-label">
<%= bootstrap_form_for Project.new, remote: true do |f| %>