allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject [21/24] allura git commit: [#8035] ESLINT FIX: no-else-return
Date Tue, 26 Jan 2016 19:11:52 GMT
[#8035] ESLINT FIX: no-else-return


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/151a3ea5
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/151a3ea5
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/151a3ea5

Branch: refs/heads/hs/8035
Commit: 151a3ea53873e56e6a716e430371313045f39abc
Parents: 576e32e
Author: Heith Seewald <heiths@gmail.com>
Authored: Thu Jan 21 19:52:56 2016 -0500
Committer: Heith Seewald <heiths@gmail.com>
Committed: Tue Jan 26 14:11:05 2016 -0500

----------------------------------------------------------------------
 Allura/allura/public/nf/js/navbar.es6.js | 40 +++++++++++++--------------
 1 file changed, 19 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/151a3ea5/Allura/allura/public/nf/js/navbar.es6.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/navbar.es6.js b/Allura/allura/public/nf/js/navbar.es6.js
index 44e2caf..ffaa371 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -531,35 +531,33 @@ var Main = React.createClass({
     render: function() {
         var _this = this;
         var navBarSwitch = showAdmin => {
+            var navbar;
             if (showAdmin) {
-                return (
-                    <AdminNav
-                        tools={ _this.state.data.menu }
+                navbar = <AdminNav
+                    tools={ _this.state.data.menu }
+                    installableTools={ _this.state.data.installable_tools }
+                    data={ _this.state.data }
+                    onToolReorder={ _this.onToolReorder }
+                    onToolDragStart={ _this.onToolDragStart }
+                    editMode={ _this.state.visible }
+                    currentOptionMenu={ _this.state.currentOptionMenu }
+                    onOptionClick={ _this.handleShowOptionMenu }
+                    currentToolOptions={this.state.currentToolOptions}
+                />;
+            } else {
+                navbar = <div>
+                    <NormalNavBar
+                        items={ _this.state.data.menu }
                         installableTools={ _this.state.data.installable_tools }
-                        data={ _this.state.data }
-                        onToolReorder={ _this.onToolReorder }
-                        onToolDragStart={ _this.onToolDragStart }
-                        editMode={ _this.state.visible }
-                        currentOptionMenu={ _this.state.currentOptionMenu }
-                        onOptionClick={ _this.handleShowOptionMenu }
-                        currentToolOptions={this.state.currentToolOptions}
                     />
-                );
-            } else {
-                return (
-                    <div>
-                        <NormalNavBar
-                            items={ _this.state.data.menu }
-                            installableTools={ _this.state.data.installable_tools }
-                            />
-                    </div>
-                );
+                </div>;
             }
+            return navbar;
         };
         var navBar = navBarSwitch(this.state.visible);
 
         var max_tool_count = _.chain(this.state.data.menu)
-                             .map((item) => {
+                             .map(item => {
                                  return item.children ? _.pluck(item.children, 'tool_name')
: item.tool_name;
                              })
                              .flatten()


Mime
View raw message