summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/blogs/BlogView.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-08-04 19:42:52 +0200
committerJules Laplace <julescarbon@gmail.com>2020-08-04 19:42:52 +0200
commit371bbbb0a4dc3e6c44d3c4b91e330002c078cd78 (patch)
tree84787903cad65963e8139be53e49d1a0b441e17f /StoneIsland/www/js/lib/blogs/BlogView.js
parent9e9d6dd6ee433d25516f4a686d58b764ef9abc1a (diff)
alt text
Diffstat (limited to 'StoneIsland/www/js/lib/blogs/BlogView.js')
-rwxr-xr-xStoneIsland/www/js/lib/blogs/BlogView.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js
index 9190634c..d37846c2 100755
--- a/StoneIsland/www/js/lib/blogs/BlogView.js
+++ b/StoneIsland/www/js/lib/blogs/BlogView.js
@@ -61,9 +61,11 @@ var BlogView = View.extend({
}
else {
app.departments = app.store.Departments
- app.department_id = app.store.Departments[0].uri
+ if (app.store.Departments.length) {
+ app.department_id = app.store.Departments[0].uri
+ app.collection.setCollectionName( app.store.Departments[0].text )
+ }
$("#collections h1").toggleClass("single-dept", app.store.Departments.length == 1)
- app.collection.setCollectionName( app.store.Departments[0].text )
//// demo department for shoes with weird SizeTypeId
// app.department_id = "NKDrtSC"
if (sdk.env === 'test') {