Проблема в том, что Splice для массива, взятого из подписки поведенческого субъекта в виде массива типов, похоже, манипулирует непосредственно на значении субъекта
Я изолировал проблему до очень маленькой, но точной проблемы.
this.aktiver.aktiver$.subscribe(res => {
console.log(res);
const x = res;
x.forEach((ele , i) => {
x.splice(i);
})
})
...
the output of the log gives me an array of 2 elements, but, when i open it, its empty, and says "value below was edited just now"
so the splice seems to have edited the original value of the behavioural subject that is aktiver$
i thought this couldnt happen, any ideas what is going wrong in my example?