Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andregoncalvesdev authored and andre-geraldes committed Jan 29, 2024
1 parent 1af62eb commit 348c8b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ Where a `config` object can be passed to the constructor:

| Property | Default Value | Values |
| -------------- | ------------- | ---------------------------------- |
| environment | 'production' | 'production', 'sandbox' |
| is_android_app | false | true, false |
| is_ios_app | false | true, false |
| theme | 'dark' | 'dark', 'light' |
| variant | 'new-tab' | 'new-tab', 'same-tab', 'iframe' |
| environment | `production` | `production`, `sandbox` |
| is_android_app | `false` | `true`, `false` |
| is_ios_app | `false` | `true`, `false` |
| theme | `dark` | `dark`, `light` |
| variant | `new-tab` | `new-tab`, `same-tab`, `iframe` |

### Initiate Topper

Expand Down
7 changes: 5 additions & 2 deletions src/topper-web-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class TopperWebSdk {

initialize({
bootstrapToken,
config = {},
config,
iframeElement
}: {
bootstrapToken: string;
Expand All @@ -85,7 +85,10 @@ class TopperWebSdk {
}

this.isInitialized = true;
this.setConfig(config);

if (config) {
this.setConfig(config);
}

const baseUrl = this.config.environment === Environments.SANDBOX ? Urls.SANDBOX : Urls.PRODUCTION;
const isTopperSelfEmbed = window.location.href.includes(Urls.WEBSITE);
Expand Down

0 comments on commit 348c8b9

Please sign in to comment.