diff --git a/src/navigator/view/ItemView.js b/src/navigator/view/ItemView.js
index 7afc1aec6..58ca2572e 100644
--- a/src/navigator/view/ItemView.js
+++ b/src/navigator/view/ItemView.js
@@ -51,7 +51,7 @@ export default Backbone.View.extend({
-
${count || ''}
+ ${count || ''}
@@ -295,26 +295,21 @@ export default Backbone.View.extend({
* @return void
* */
checkChildren() {
- const model = this.model;
+ const { model, clsNoChild } = this;
const count = this.countChildren(model);
- const pfx = this.pfx;
- const noChildCls = this.clsNoChild;
const title = this.$el
.children(`.${this.clsTitleC}`)
.children(`.${this.clsTitle}`);
+ let { cnt } = this;
- if (!this.cnt) {
- this.cnt = this.$el.children(`.${this.clsCount}`);
+ if (!cnt) {
+ cnt = this.$el.children('[data-count]').get(0);
+ this.cnt = cnt;
}
- if (count) {
- title.removeClass(noChildCls);
- this.cnt.html(count);
- } else {
- title.addClass(noChildCls);
- this.cnt.empty();
- model.set('open', 0);
- }
+ title[count ? 'removeClass' : 'addClass'](clsNoChild);
+ if (cnt) cnt.innerHTML = count || '';
+ !count && model.set('open', 0);
},
/**