rsi.server icon indicating copy to clipboard operation
rsi.server copied to clipboard

Report an error when pushing elements with already existing id to a resource.

Open wzr1337 opened this issue 6 years ago • 0 comments

The following code snippet should fail

while(1) {
            let anim = new BehaviorSubject<AnimalElement>({
                lastUpdate: Date.now(),
                propertiesChanged: ["animalname", "genus", "genus"],
                data: {
                    uri: "/" + this.service.name.toLowerCase() + "/" + this.name.toLowerCase() + "/" + AnimalData.animalDataId,
                    id: AnimalData.animalDataId,
                    name: "OBD",
                    animalname: JSON.parse(data).animalName,
                    genus: JSON.parse(data).genus,
                    species: JSON.parse(data).species
                }
            });
            this.animalRenderer.push(anim);
        }

wzr1337 avatar Mar 15 '18 09:03 wzr1337