title: ES6 Uncaught TypeError: Object(...) is not a function
body: <p>I'm returning a <code>Promise</code> from this function</p>
  
  <pre><code>const liab_config = () =&gt; {
    return axios.get(`${config.server_url}/fetch_config_liab`);
  }
  
  export default { liab_config }
  </code></pre>
  
  <p>And trying to handle the <code>Promise</code> inside another file</p>
  
  <pre><code>import liab_config from './utils/kc-adapter'
  
  function set_liab_config(){
    liab_config().then((response) =&gt; {
      if(response.data.success){
        let { kc_config_liab } = response.data;
        return kc_config_liab['auth-server-url'];
      }
      else
        return null;
    }).catch(ex =&gt; 
      console.log(ex));
    }
  </code></pre>
  
  <p>Here I'm getting the error as:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Object(...) is not a function</p>
  </blockquote>
  
  <p>on line <code>liab_config().then((response)</code>. What could be the reason?</p>