Skip to content

Commit

Permalink
feat: add window / document checks, refactor XMLHttpRequest to Fetch (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
KonnorRogers authored Dec 7, 2022
1 parent 287eb50 commit b7e717f
Show file tree
Hide file tree
Showing 21 changed files with 4,570 additions and 1,245 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ node_modules
*/**/dist
*/**/.DS_Store
*/**/node_modules

lerna-debug.log
browserstack.err
3 changes: 1 addition & 2 deletions packages/core/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
filterUrl,
formatCGIData,
getSourceForBacktrace,
runAfterNotifyHandlers, endpoint, isBrowserConfig, getCauses
runAfterNotifyHandlers, endpoint, getCauses
} from './util'
import {
Config,
Expand Down Expand Up @@ -206,7 +206,6 @@ export abstract class Client {
endpoint: endpoint(this.config.endpoint, '/v1/notices/js'),
maxObjectDepth: this.config.maxObjectDepth,
logger: this.logger,
async: isBrowserConfig(this.config) ? this.config.async : undefined,
}, payload)
.then(res => {
if (res.statusCode !== 201) {
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export type TransportOptions = {
endpoint: string,
maxObjectDepth?: number,
logger: Logger
async?: boolean // don't like this here because it's only for browser
}

export type NoticeTransportPayload = {
Expand Down
Loading

0 comments on commit b7e717f

Please sign in to comment.