FIX: categories/delete_categories can be undefined (#6657)

This commit is contained in:
Joffrey JAFFEUX 2018-11-23 00:57:18 +01:00 committed by GitHub
parent 06b3621e80
commit f4432648fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -114,8 +114,8 @@ export default {
const router = container.lookup("router:main");
bus.subscribe("/categories", data => {
data.categories.forEach(c => site.updateCategory(c));
data.deleted_categories.forEach(id => site.removeCategory(id));
(data.categories || []).forEach(c => site.updateCategory(c));
(data.deleted_categories || []).forEach(id => site.removeCategory(id));
});
bus.subscribe("/client_settings", data =>