[O] Only add home if not exist

This commit is contained in:
Hykilpikonna
2019-12-25 17:55:40 -05:00
parent 481adc5bd7
commit a9b20914fb
+3
View File
@@ -116,8 +116,11 @@ export default class App extends Vue
this.artworks.sort((a, b) => b.date.getTime() - a.date.getTime()); this.artworks.sort((a, b) => b.date.getTime() - a.date.getTime());
// Add home as a type // Add home as a type
if (this.config.types[0].type != 'Home')
{
this.config.types.unshift({type: 'Home', posts: []}); this.config.types.unshift({type: 'Home', posts: []});
} }
}
/** /**
* Filter out artworks of selected type * Filter out artworks of selected type