Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendOnLeave throws a TypeError #47

Open
adriaandotcom opened this issue Sep 26, 2024 · 0 comments
Open

sendOnLeave throws a TypeError #47

adriaandotcom opened this issue Sep 26, 2024 · 0 comments

Comments

@adriaandotcom
Copy link
Collaborator

sendOnLeave throws a TypeError: Illegal invocation on line 554:

nav.sendBeacon(fullApiUrl + "/append", stringify(append));

This is the relevant part of the code:

if (push || !nav.sendBeacon) {
    // sendData will assign payload to request
    sendData(append, undefinedVar, trueVar);
} else {
    nav.sendBeacon(fullApiUrl + "/append", stringify(append));
}

The error happens when nav.sendBeacon is invoked in the else block.

You might want to check if nav or sendBeacon is being called out of context or if there’s an issue with the scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant