analog
analog copied to clipboard
Event replay js-actions aren't working
Please provide the environment you discovered this bug in.
https://stackblitz.com/edit/github-zc67zw
Which area/package is the issue in?
Don't know / other
Description
In build time, Angular CLI is using this class https://github.com/angular/angular-cli/blob/main/packages/angular/build/src/utils/index-file/index-html-generator.ts#L82 inject a script (maybe other not related interesting things) to enable the event-replay actions, specifically here https://github.com/angular/angular-cli/blob/main/packages/angular/build/src/utils/index-file/add-event-dispatch-contract.ts#L14; without that script in runtime I get that exception.
As a workaround, I put in my HTML the js script:
Please provide the exception or error you saw
chunk-T5GBXR7Y.js?v=db991a5a:22766 Uncaught (in promise)
TypeError: Cannot read properties of undefined (reading '_ejsa')
at getJsactionData (chunk-T5GBXR7Y.js?v=db991a5a:22766:20)
at chunk-T5GBXR7Y.js?v=db991a5a:22807:41
Other information
No response
I would be willing to submit a PR to fix this issue
- [X] Yes
- [ ] No