Commit 855b9ddd authored by Mathias Bynens's avatar Mathias Bynens Committed by Commit Bot

[DevTools] Accept empty-string timezone IDs

This patch loosens up the timezone ID validation so the form accepts
empty-string inputs.

Bug: chromium:993628, chromium:1015770
Change-Id: I2c0d552dcbc2a3cdf2c31cc129a7ad43b7240955
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868996Reviewed-by: default avatarTim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707335}
parent 5ad5b933
...@@ -279,7 +279,8 @@ export class Geolocation { ...@@ -279,7 +279,8 @@ export class Geolocation {
// but instead tries to make sense of the input, even for // but instead tries to make sense of the input, even for
// weird-looking timezone IDs. There's not much point in validating // weird-looking timezone IDs. There's not much point in validating
// the input other than checking if it contains at least one slash. // the input other than checking if it contains at least one slash.
const valid = value.includes('/'); // The empty string resets the override, and is accepted as well.
const valid = value === '' || value.includes('/');
return {valid}; return {valid};
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment