- Rename apiPath to apiUrl

This commit is contained in:
goenning 2023-12-29 09:38:24 -03:00
parent c980afd786
commit 9002311059
7 changed files with 20 additions and 10 deletions

View file

@ -1,3 +1,7 @@
## 0.4.2
- Fix error when running on chrome
## 0.4.1
- Support for custom API path

View file

@ -1,6 +1,6 @@
{
"name": "@aptabase/web",
"version": "0.4.1",
"version": "0.4.2",
"type": "module",
"description": "JavaScript SDK for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps",
"main": "./dist/index.cjs",

View file

@ -13,7 +13,7 @@ export { type AptabaseOptions };
export function init(appKey: string, options?: AptabaseOptions) {
if (!validateAppKey(appKey)) return;
_apiUrl = getApiUrl(appKey, options);
_apiUrl = options?.apiUrl ?? getApiUrl(appKey, options);
_appKey = appKey;
_options = options;
}