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

allow host and namespace be empty #425

Description

@artemgurzhii

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions