diff --git a/meme-together.html b/meme-together.html
index 7fcc934..a8d7990 100644
--- a/meme-together.html
+++ b/meme-together.html
@@ -3918,7 +3918,7 @@
{{heading}}
@@ -3964,13 +3964,17 @@ {{heading}}
}
that.feed.observe(function(events){
for(var i in events){
- var new_meme = document.createElement("meme-container");
- new_meme.yatta = events[i].value;
- var b = that.$.meme_containers.children[events[i].position];
- if(b != null){
- that.$.meme_containers.insertBefore(new_meme,b)
+ if(events[i].type === "insert"){
+ var new_meme = document.createElement("meme-container");
+ new_meme.yatta = events[i].value;
+ var b = that.$.meme_containers.children[events[i].position];
+ if(b != null){
+ that.$.meme_containers.insertBefore(new_meme,b)
+ } else {
+ that.$.meme_containers.appendChild(new_meme)
+ }
} else {
- that.$.meme_containers.appendChild(new_meme)
+ that.$.meme_containers.removeChild(that.$.meme_containers.children[events[i].position]);
}
}
});