Skip to content

Commit 505f11b

Browse files
committed
Publishing with fixed getCustomSettings
1 parent 3feeb84 commit 505f11b

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

docs/hds-lib.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/hds-lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/tests-browser.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21309,7 +21309,7 @@ class Application {
2130921309
* Get current settings previously set with setCustomSettings()
2131021310
*/
2131121311
async getCustomSettings (forceRefresh = false) {
21312-
if (forceRefresh || this.cache.customSettingsEvent) {
21312+
if (forceRefresh || !this.cache.customSettingsEvent) {
2131321313
const customSettingsEvent = (await this.connection.apiOne('events.get', { streams: [this.baseStreamId], types: ['settings/any'], limit: 1 }, 'events'))[0];
2131421314
this.cache.customSettingsEvent = customSettingsEvent;
2131521315
}
@@ -22772,9 +22772,11 @@ describe('[APAX] Application class', () => {
2277222772
assert.deepEqual(newSettings, newSettings1);
2277322773
const newSettings2 = await appDummy.getCustomSettings();
2277422774
assert.deepEqual(newSettings, newSettings2);
22775-
// assert.equal(newSettings1, newSettings2, 'should be the same object');
22775+
assert.deepEqual(newSettings1, newSettings2);
22776+
assert.equal(newSettings1, newSettings2, 'should be the same object');
2277622777
const newSettings3 = await appDummy.getCustomSettings(true);
2277722778
assert.deepEqual(newSettings1, newSettings3);
22779+
assert.notEqual(newSettings1, newSettings3, 'should not be the same object');
2277822780
});
2277922781
});
2278022782

docs/tests-browser.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/appTemplates/Application.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ class Application {
134134
*/
135135
async getCustomSettings (forceRefresh = false) {
136136
if (forceRefresh || !this.cache.customSettingsEvent) {
137-
console.log('>>A');
138137
const customSettingsEvent = (await this.connection.apiOne('events.get', { streams: [this.baseStreamId], types: ['settings/any'], limit: 1 }, 'events'))[0];
139138
this.cache.customSettingsEvent = customSettingsEvent;
140139
}

0 commit comments

Comments
 (0)