Skip to content

Instantly share code, notes, and snippets.

@gearsdigital
Last active August 29, 2015 14:24
Show Gist options
  • Select an option

  • Save gearsdigital/0df212c86cf1a2c1f127 to your computer and use it in GitHub Desktop.

Select an option

Save gearsdigital/0df212c86cf1a2c1f127 to your computer and use it in GitHub Desktop.
this.getCategory = function(){
//2. use async : test key input is idMenu
me.listCategory = async.map([1], helper.categoryInMenu, function(err, result){
return result;
});
return me.listCategory;
}
@maphim

maphim commented Jul 15, 2015

Copy link
Copy Markdown

i try

this.getCategory = function(){

       //2. use async : test key input is idMenu
       var list = async.map([1], helper.categoryInMenu, function(err, result){
          return result;
       });

       console.log(list); // display undefined =)))        

       return list; // so list = undefined;
    }

@maphim

maphim commented Jul 15, 2015

Copy link
Copy Markdown

async.map is void method, not return ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment