diff --git a/js/src/playground/store.js b/js/src/playground/store.js index e627cdcc1..db0df38b4 100644 --- a/js/src/playground/store.js +++ b/js/src/playground/store.js @@ -14,12 +14,12 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -import { action, observable } from 'mobx'; +import { action } from 'mobx'; let instance = null; export default class PlaygroundStore { - @observable components = []; + components = []; static get () { if (!instance) { @@ -35,17 +35,6 @@ export default class PlaygroundStore { @action add (component) { - const name = component.type.displayName || component.type.name; - const hasComponent = this.components.find((c) => { - const cName = c.type.displayName || c.type.name; - - return name && cName && cName === name; - }); - - if (hasComponent) { - return; - } - this.components.push(component); } } diff --git a/js/src/playground/store.spec.js b/js/src/playground/store.spec.js index 27db2411b..172d244fd 100644 --- a/js/src/playground/store.spec.js +++ b/js/src/playground/store.spec.js @@ -31,11 +31,4 @@ describe('playground/store', () => { PlaygroundStore.register(); expect(store.components.length).greaterThan(0); }); - - it('adds new Components only once', () => { - PlaygroundStore.register(); - PlaygroundStore.register(); - - expect(store.components.filter((c) => /QrCode/i.test(c.type.name)).length).equal(1); - }); });