crisp-im / crisp-sdk-web

:package: Include the Crisp chat widget from using frameworks such as React, VueJS, Angular...
https://www.npmjs.com/package/crisp-sdk-web
MIT License
39 stars 13 forks source link

session.reset error #28

Closed marc-rutkowski closed 5 months ago

marc-rutkowski commented 7 months ago

Crisp.session.reset() triggers an error window.$crisp.do is not a function.

The culprit seems to be the following line : https://github.com/crisp-im/crisp-sdk-web/blob/a30d3c437bbb41d207f929871d767ae6f3582eab/src/session.ts#L25

that should be changed to: window.$crisp.push(["do", "session:reset", [reload]]);

Let me know if I need to open a PR.

eliottvincent commented 5 months ago

Hey, thanks for reporting the issue. This is fixed, make sure to update to the latest version (v1.0.25)