Skip to content

Commit 5102075

Browse files
committed
Fix incorrect timeout on detach event
1 parent 3ef7677 commit 5102075

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

common/plugin-element-cache.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ export const addElementToCache = (element, key, data = {}) => {
66
data,
77
};
88

9-
setTimeout(
10-
() =>
11-
element.addEventListener('flotiq.detached', () => {
12-
delete appRoots[key];
13-
}),
14-
50,
15-
);
9+
element.addEventListener('flotiq.detached', () => {
10+
setTimeout(() => {
11+
return delete appRoots[key];
12+
}, 50);
13+
});
1614
};
1715

1816
export const getCachedElement = (key) => {

plugin-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "flotiq.custom-links",
33
"name": "Custom Links",
4-
"version": "1.0.2",
4+
"version": "1.0.3",
55
"description": "This plugin will display a button with a link in the edit content object. The link will be supplemented with data from the currently edited object. Thanks to this link, you will be able to get easy access to the preview of where the content is used.",
66
"repository": "https://github.com/flotiq/flotiq-ui-plugins-custom-links",
77
"url": "https://localhost:3053/index.js",

0 commit comments

Comments
 (0)