I have an angular project that is being built with the command:
`npm run start`
which runs the script:
"start": "set NODE_OPTIONS=--openssl-legacy-provider && ng serve --proxy-config proxy.conf.json --prod",
When the app is opened in "http://localhost:4200" it seems to load ok, but as soon as I change the user using the command:
_setUser(window._user.sally_superAdmin);
The user info is returned but I get an error message in the console:
main.js:1 ERROR Malformed UTF-8 data
rc @ main.js:1
handleError @ main.js:1
next @ main.js:1
__tryOrUnsub @ main.js:1
next @ main.js:1
_next @ main.js:1
next @ main.js:1
next @ main.js:1
emit @ main.js:1
main.js:1 ERROR TypeError: Cannot read properties of undefined (reading 'filter')
at a.project (main.js:1:4756133)
at a._next (main.js:1:3551188)
at a.next (main.js:1:3529941)
at a._next (main.js:1:3551286)
at a.next (main.js:1:3529941)
at h._next (main.js:1:3557774)
at h.next (main.js:1:3529941)
at h._next (main.js:1:3530167)
at h.next (main.js:1:3529941)
at h._next (main.js:1:3560273)
I cannot figure out why I am getting the TypeError problem or even where to start looking. Has anyone any ideas?
I debugged the line in main.js (which is autogenerated via angular) and I get to this line of code. I just don't know where to look from here?
let i = (()=>{
class f {
constructor(g) {
this.http = g,
this.documents = {],
this.resource = "help"
}
query(g=!1) {
return this.http.get(`${this.resource}/query`).pipe((0,
o.q)(1), (0,
a.U)(v=>v.help), (0,
a.U)(v=>g ? v : v.filter(d=>"deleted" !== d.status)))
}
save(g) {
return this.http.post(`${this.resource}/save`, g).pipe((0,
a.U)(v=>v.help))
}
remove(g) {