When calling destroy(), the Element where the graph is being applied is removed from the DOM. Since this element is not created and managed by p2p-graph but instead provided by us, it should be left untouched, as it's done at https://github.com/Novage/p2p-media-loader/blob/85adce9b0edbc00dfa073321d93a61590af3afc8/p2p-media-loader-demo/index.html#L1234-L1240
p2p-graph/index.js
Line 261 in 3334451
When calling
destroy(), theElementwhere the graph is being applied is removed from the DOM. Since this element is not created and managed byp2p-graphbut instead provided by us, it should be left untouched, as it's done at https://github.com/Novage/p2p-media-loader/blob/85adce9b0edbc00dfa073321d93a61590af3afc8/p2p-media-loader-demo/index.html#L1234-L1240