🐛 Site > Fix reseting project
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Discussions
|
||||
</header>
|
||||
<div class="messages">
|
||||
<div class="message" v-for="message of messages" :key="message.id">
|
||||
<div class="message" v-for="message of messages" :key="message.date">
|
||||
<div class="date">
|
||||
{{ message.time }}
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ export default
|
||||
{
|
||||
project()
|
||||
{
|
||||
return this.$store.state.projects.all
|
||||
return this.$store.state.projects.current
|
||||
},
|
||||
|
||||
file()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export default
|
||||
{
|
||||
name: 'projects-hub',
|
||||
name: 'projects',
|
||||
|
||||
computed:
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<a href="#" v-for="project in projects" @click.prevent="onProjectClick(project.slug)">
|
||||
<a href="#" v-for="project in projects" :key="project.slug" @click.prevent="onProjectClick(project.slug)">
|
||||
{{ project.name }}
|
||||
</a>
|
||||
</div>
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
if(state.current)
|
||||
{
|
||||
// Current project has been removed
|
||||
if(typeof state.all[data] === 'undefined')
|
||||
if(typeof state.all[state.current.slug] === 'undefined')
|
||||
{
|
||||
state.current = null
|
||||
}
|
||||
@@ -46,6 +46,6 @@ export default {
|
||||
{
|
||||
state.current = state.all[data]
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user