diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-03-02 08:25:52 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2016-03-02 08:25:52 +0100 |
commit | b32ca6c0f5968f5e9f59847db5012e3ef7f98631 (patch) | |
tree | 83d6bd430c56ae552acb9577a53f0a2c9fbb7052 /src/web/js/components/Menu.react.js | |
parent | minor update to the navbar (diff) | |
download | newspipe-b32ca6c0f5968f5e9f59847db5012e3ef7f98631.tar.gz newspipe-b32ca6c0f5968f5e9f59847db5012e3ef7f98631.tar.bz2 newspipe-b32ca6c0f5968f5e9f59847db5012e3ef7f98631.zip |
Code update. Some problems with CSRF token on Chromium...
Diffstat (limited to 'src/web/js/components/Menu.react.js')
-rw-r--r-- | src/web/js/components/Menu.react.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/web/js/components/Menu.react.js b/src/web/js/components/Menu.react.js index 60578f8a..f4ad76d0 100644 --- a/src/web/js/components/Menu.react.js +++ b/src/web/js/components/Menu.react.js @@ -84,13 +84,15 @@ var CategoryGroup = React.createClass({ name: React.PropTypes.string.isRequired, feeds: React.PropTypes.array.isRequired, unread: React.PropTypes.number.isRequired, - folded: React.PropTypes.bool.isRequired, + folded: React.PropTypes.bool, }, getInitialState: function() { - return {folded: this.props.folded}; + return {folded: false}; }, componentWillReceiveProps: function(nextProps) { - this.setState({folded: nextProps.folded}); + if(nextProps.folded != null) { + this.setState({folded: nextProps.folded}); + } }, render: function() { // hidden the no category if empty |