refactor(core): rename getCurrentValue to fetchCurrentValue

Also use Promise.allSettled in ContextBridge.refresh() to handle
provider errors gracefully.

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-01-18 20:23:54 +00:00
parent 3c16dd4275
commit 037589cf4f
8 changed files with 41 additions and 19 deletions

View File

@@ -107,7 +107,7 @@ class LocationProvider implements ContextProvider<Location> {
return () => navigator.geolocation.clearWatch(watchId)
}
async getCurrentValue(): Promise<Location> {
async fetchCurrentValue(): Promise<Location> {
const pos = await new Promise<GeolocationPosition>((resolve, reject) => {
navigator.geolocation.getCurrentPosition(resolve, reject)
})