Skip to content

Getting "Uncaught (in promise)" while handling onBeforeExit event #62

@kambadprashant

Description

@kambadprashant

I have used the below code from the documentation: https://tourguidejs.com/docs/events.html#onbeforeexit

tg.onBeforeExit(()=>{ return new Promise((resolve, reject) => { if (confirm('Are you sure you want to close the tour?')) { return resolve(true) } else { return reject('User Cancelled Tour') } }) })

But it throws Uncaught (in promise) User Cancelled Tour
After that all buttons become unresponsive and console logs the following error Uncaught (in promise) Promise waiting

Have already updated the library to latest version (0.0.26)

Do i need to handle this error somewhere? Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions