diff --git a/README.md b/README.md index ea59de2f..2b2757ea 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Radar.initialize('prj_test_pk_...', { /* options */ }); Add the following script in your `html` file ```html - + ``` Then initialize the Radar SDK @@ -73,8 +73,8 @@ To create a map, first initialize the Radar SDK with your publishable key. Then ```html - - + + @@ -98,8 +98,8 @@ To create an autocomplete input, first initialize the Radar SDK with your publis ```html - - + + @@ -130,8 +130,8 @@ To power [geofencing](https://radar.com/documentation/geofencing/overview) exper ```html - - + + diff --git a/package-lock.json b/package-lock.json index da6cc9dd..90a1df79 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "radar-sdk-js", - "version": "4.2.0-beta.0", + "version": "4.2.0", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 37bea32a..21813e9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "radar-sdk-js", - "version": "4.2.0-beta.0", + "version": "4.2.0", "description": "Web Javascript SDK for Radar, location infrastructure for mobile and web apps.", "homepage": "https://radar.com", "type": "module", diff --git a/src/navigator.ts b/src/navigator.ts index 01fdfba4..26834771 100644 --- a/src/navigator.ts +++ b/src/navigator.ts @@ -90,9 +90,9 @@ class Navigator { (err: GeolocationPositionError) => { // location call failed or user did not grant permission if (err && err.code === 1) { // https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPositionError - // code 1 means permission denied + // code 1 means location permissions denied // codes 2 and 3 mean location unavailable or timeout - return reject(new RadarPermissionsError('Permission denied.')); + return reject(new RadarPermissionsError('Browser location permissions denied.')); } return reject(new RadarLocationError('Could not determine location.')); }, diff --git a/src/version.ts b/src/version.ts index 244537d7..5897a092 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export default '4.2.0-beta.0'; +export default '4.2.0'; diff --git a/test/api/track.test.ts b/test/api/track.test.ts index b5d4a516..55fb564d 100644 --- a/test/api/track.test.ts +++ b/test/api/track.test.ts @@ -53,7 +53,7 @@ describe('Track', () => { throw new Error('Test did not throw expected error.'); } catch (err: any) { expect(err.name).toEqual('RadarPermissionsError'); - expect(err.message).toEqual('Permission denied.'); + expect(err.message).toEqual('Browser location permissions denied.'); expect(err.status).toEqual('ERROR_PERMISSIONS'); } }); diff --git a/test/navigator.test.ts b/test/navigator.test.ts index e00f7be9..7e1bd975 100644 --- a/test/navigator.test.ts +++ b/test/navigator.test.ts @@ -13,7 +13,7 @@ describe('Navigator', () => { throw new Error('Response should not succeed.'); } catch (err: any) { expect(err.name).toEqual('RadarPermissionsError'); - expect(err.message).toEqual('Permission denied.'); + expect(err.message).toEqual('Location permissions denied.'); expect(err.status).toEqual('ERROR_PERMISSIONS'); } });