Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

allow host and namespace be empty #425

Open
artemgurzhii opened this issue Jan 9, 2019 · 0 comments
Open

allow host and namespace be empty #425

artemgurzhii opened this issue Jan 9, 2019 · 0 comments

Comments

@artemgurzhii
Copy link

artemgurzhii commented Jan 9, 2019

Allow host and namespace be empty strings?

// app/services/ajax.js
export default AjaxService.extend({
  host: 'https://my-awesome-app.com',
  namespace: '/api/v1',
});
// Some controller/component action
this.ajax.request('/some-url', { namespace: '/' });

// Expected: GET 'https://my-awesome-app.com/api/v1/some-url'
// Result:   GET 'https://my-awesome-app.com/api/v1/some-url'


this.ajax.request('/some-url', { namespace: '' });

// Expected: GET 'https://my-awesome-app.com/some-url'
// Result:   GET 'https://my-awesome-app.com/api/v1/some-url'

Is there any reason for not using Ember.isNone check?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant