Skip to content

Commit

Permalink
fix(server): fixed default configuration
Browse files Browse the repository at this point in the history
when a configuration was not provided, the server sdk would fail
  • Loading branch information
foundrium committed Sep 16, 2021
1 parent 0bfc0bb commit f370d99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/src/api/haste.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export class Haste {
throw new Error(`You must initialize Haste with an environment equal to production or nonproduction.`);
}

const url = buildUrl(configuration.hostProtocol, configuration.host, configuration.port);
if (!configuration) configuration = new HasteConfiguration(environment);
const url = buildUrl(configuration.hostProtocol, configuration.host, configuration.port);
const tokenResponse = await Haste.getJwt(clientId, clientSecret, url, configuration.environment);

configuration.clientId = clientId;
Expand Down

0 comments on commit f370d99

Please sign in to comment.