Skip to content

Commit 10cb93b

Browse files
author
Joe Goggins
committed
Bugfix for [sc-105035]
This fix makes api.getEventStream() honor a baseUrl that has been changed via api.setBaseUrl.
1 parent 6408739 commit 10cb93b

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Particle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,6 +2179,7 @@ class Particle {
21792179

21802180
// Internal method used to target Particle's APIs other than the default
21812181
setBaseUrl(baseUrl){
2182+
this.baseUrl = baseUrl;
21822183
this.agent.setBaseUrl(baseUrl);
21832184
}
21842185
}

test/Particle.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2734,6 +2734,12 @@ describe('ParticleAPI', () => {
27342734
sinon.restore();
27352735
});
27362736

2737+
it('sets baseUrl instance property', () => {
2738+
const baseUrl = 'foo';
2739+
api.setBaseUrl(baseUrl);
2740+
expect(api.baseUrl).to.eql(baseUrl);
2741+
});
2742+
27372743
it('calls agent.setBaseUrl', () => {
27382744
const baseUrl = 'foo';
27392745
sinon.stub(api.agent, 'setBaseUrl');

0 commit comments

Comments
 (0)