don't start worker in iframe ctx

This commit is contained in:
nick-delirium 2024-10-07 14:42:52 +02:00
parent 719a102996
commit 56c6ec66f1
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -350,8 +350,6 @@ export default class App {
this.session.applySessionHash(sessionToken)
}
this.initWorker()
const thisTab = this.session.getTabId()
/**
@ -367,6 +365,8 @@ export default class App {
'*',
)
}, 250)
} else {
this.initWorker()
}
/**
* if we get a signal from child iframes, we check for their node_id and send it back,
@ -1269,7 +1269,7 @@ export default class App {
})
const timestamp = now()
this.worker.postMessage({
this.worker?.postMessage({
type: 'start',
pageNo: this.session.incPageNo(),
ingestPoint: this.options.ingestPoint,
@ -1375,9 +1375,9 @@ export default class App {
if (socketOnly) {
this.socketMode = true
this.worker.postMessage('stop')
this.worker?.postMessage('stop')
} else {
this.worker.postMessage({
this.worker?.postMessage({
type: 'auth',
token,
beaconSizeLimit,