Skip to content

Commit

Permalink
chore: allow to use domain or origin in config to create API client
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Jun 10, 2024
1 parent 2051529 commit ddb91ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/client/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export function createClient (config) {
// Get the base URL/domain to be used (useful for mobile apps)
api.getBaseUrl = function () {
// We can override the default app origin anyway
const origin = config.origin || window.location.origin
const origin = config.domain || config.origin || window.location.origin
// Check for registered custom base Url if any
return LocalStorage.get(baseUrlStorageKey, origin)
}
Expand Down

0 comments on commit ddb91ca

Please sign in to comment.