BlackScorp/Crafty — comment on commit 14894f4ceb538522da247c9974d9d6db304866d0
File:  line 0
By lapilofu:

I don't think this will work quite as expected. If I do

var e = Crafty.e("2D,DOM,Test");
e.toggleComponent("2D,DOM","2D,Canvas"); //Replace 2D and DOM Components with 2D and Canvas

Then I will expect e to have components `"2D, Canvas, Test"` but it will only have component `"Test"`, unless I am misunderstanding the code. I would expect .toggleComponent("2D,DOM", "2D,Canvas") to switch back and forth between the DOM and Canvas components. Am I misunderstanding the intention?