Skip to content

Fix refresh bug when response status is string#335

Merged
zhiyuanliang-ms merged 1 commit into
mainfrom
zhiyuanliang/fix-string-status
Jun 26, 2026
Merged

Fix refresh bug when response status is string#335
zhiyuanliang-ms merged 1 commit into
mainfrom
zhiyuanliang/fix-string-status

Conversation

@zhiyuanliang-ms

Copy link
Copy Markdown
Member

@zhiyuanliang-ms zhiyuanliang-ms merged commit 384ee73 into main Jun 26, 2026
6 checks passed
@zhiyuanliang-ms zhiyuanliang-ms deleted the zhiyuanliang/fix-string-status branch June 26, 2026 05:50
const watcher: SettingWatcher = this.#sentinels.get(watchedSetting)!; // watcher should always exist for sentinels
const isDeleted = response === undefined && watcher.etag !== undefined; // previously existed, now deleted
const isChanged = response && response.statusCode === 200 && watcher.etag !== response.etag; // etag changed
const isChanged = response && Number(response.statusCode) === 200 && watcher.etag !== response.etag; // etag changed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to have comment in the code/helper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants