Skip to content

Commit b2b76ed

Browse files
Merge branch 'preview' of https://github.com/Azure/AppConfiguration-JavaScriptProvider into zhiyuanliang/afd-support
2 parents 339b3fa + 7ead0bc commit b2b76ed

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/appConfigurationImpl.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,14 +786,13 @@ export class AzureAppConfigurationImpl implements AzureAppConfiguration {
786786
if (selector.snapshotName) { // skip snapshot selector
787787
continue;
788788
}
789+
const pageWatchers: SettingWatcher[] = selector.pageWatchers ?? [];
789790
const listOptions: ListConfigurationSettingsOptions = {
790791
keyFilter: selector.keyFilter,
791792
labelFilter: selector.labelFilter,
792793
tagsFilter: selector.tagFilters
793794
};
794795

795-
const pageWatchers: SettingWatcher[] = selector.pageWatchers ?? [];
796-
797796
if (!this.#isCdnUsed) {
798797
// if CDN is not used, add page etags to the listOptions to send conditional request
799798
listOptions.pageEtags = pageWatchers.map(w => w.etag ?? "") ;

test/refresh.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ describe("dynamic refresh", function () {
193193
await settings.refresh();
194194
expect(listKvRequestCount).eq(2);
195195
expect(getKvRequestCount).eq(2); // one conditional request to detect change
196-
expect(settings.get("app.settings.fontColor")).eq(undefined);
196+
expect(settings.get("app.settings.fontColor")).to.be.undefined;
197197
});
198198

199199
it("should not update values when unwatched setting changes", async () => {

0 commit comments

Comments
 (0)