title: return function call and tertiary conditional not working
body: <p>I am having a devil of a time trying to figure this out. I have a function that returns the value of another function. Within the second function I have a tertiary conditional and it will NOT get that return.. I can't figure it out. I am sure it is a scope issue, but i can't solve it. This is all within a jquery plugin.</p>
  
  <pre><code> somefunctionA: function(){
     var self = this;
     var data = somecollection_of_data;
     var storeReturn = $.map( data, function( obj, i) {
                              return (function(i){
                                   return self._returnFilteredData(id);
                              })(obj.i);
               });
   },
  
    __returnFilteredData: function(i){
                  var self = this;
                    if(some_conditionals){
                       return (
                         self.url ?
                         (function(){
                             if(some_more_conditionals){
                                 self._getDBdata();  &lt;&lt;-- NEVER FIRES OFF
                             }
                        }) : self._getDBdata()  &lt;&lt;--- THIS ONE FIRES OFF
                       )
                    }
                 }
              },
  </code></pre>
  
  <p>so what ends up happening is I get a "null" in the storeReturn array because in some conditionals that first tertiary fails. I cannot get into it... to test.</p>
  
  <p>the "_getDBdata()" function just returns a hash based on some other data.</p>
  
  <p>Any ideas on what is happening? I tried everything and I can't solve this scope/closure issue.</p>