mirror of
https://github.com/kennethnym/aris.git
synced 2026-02-02 05:01:17 +00:00
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:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user