Skip to content

Commit

Permalink
simple or instead of ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
fyockm committed Apr 28, 2014
1 parent 320a86c commit 7f85d7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions lib/mean0.3.2.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ Meanio.prototype.aggregated = aggregated;
Meanio.prototype.Menus = function() {
this.add = function(options) {

//console.log(allMenus[options.menu])

options.menu = (options.menu ? options.menu : 'main');
options.roles = (options.roles ? options.roles : ['anonymous']);

options.menu = options.menu || 'main';
options.roles = options.roles || ['anonymous'];

if (allMenus[options.menu]) {
allMenus[options.menu].push({
roles: options.roles,
Expand All @@ -83,8 +81,8 @@ Meanio.prototype.Menus = function() {

this.get = function(options) {
var allowed = [];
options.roles = (options.roles ? options.roles : ['anonymous']);
options.menu = (options.menu ? options.menu : 'main');
options.menu = options.menu || 'main';
options.roles = options.roles || ['anonymous'];

if (!allMenus[options.menu] && !options.defaultMenu) return [];

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meanio",
"version": "0.4.9",
"version": "0.4.10",
"preferGlobal": true,
"description": "Simple command line interface for installing and managing MEAN apps",
"author": {
Expand Down

0 comments on commit 7f85d7b

Please sign in to comment.