Parcourir la source

Fix for issue #261

When converse is first initialized this.model.get('closed') is undefined, at least with some configurations. This patch initializes the attribute with !show_controlbox_by_default if it is undefined.

Update CHANGES.md

fix make check

Update CHANGES.md
Christopher Rüprich il y a 9 ans
Parent
commit
aec966e36a
2 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 3 0
      converse.js
  2. 1 0
      docs/CHANGES.md

+ 3 - 0
converse.js

@@ -2555,6 +2555,9 @@
                 if (this.model.get('connected')) {
                     this.initRoster();
                 }
+                if (typeof this.model.get('closed')==='undefined') {
+                    this.model.set('closed', !converse.show_controlbox_by_default);
+                }
                 if (!this.model.get('closed')) {
                     this.show();
                 } else {

+ 1 - 0
docs/CHANGES.md

@@ -2,6 +2,7 @@
 
 ## 0.10.2 (Unreleased)
 
+- #261 show_controlbox_by_default config not working [diditopher]
 - #573 xgettext build error: `'javascript' unknown`
 
 ## 0.10.1 (2016-02-06)