diff --git a/src/plugin-helpers.js b/src/plugin-helpers.js index 83cb86d..037aff4 100644 --- a/src/plugin-helpers.js +++ b/src/plugin-helpers.js @@ -6,13 +6,11 @@ export const addElementToCache = (element, root, key) => { root, }; - setTimeout( - () => - element.addEventListener("flotiq.detached", () => { - delete appRoots[key]; - }), - 50 - ); + element.addEventListener("flotiq.detached", () => { + setTimeout(() => { + return delete appRoots[key]; + }, 50); + }); }; export const getCachedElement = (key) => { diff --git a/src/plugin-manifest.json b/src/plugin-manifest.json index ae82a2d..fad85d3 100644 --- a/src/plugin-manifest.json +++ b/src/plugin-manifest.json @@ -1,7 +1,7 @@ { "id": "flotiq.react-template", "name": "React Template Plugin", - "version": "0.1.1", + "version": "0.1.2", "description": "A react-based example of Flotiq plugin. This will render a shiny title instead of regular title fields", "repository": "https://github.com/flotiq/flotiq-ui-plugins-templates-react", "url": "https://localhost:3050/static/js/bundle.js"