I created a simple component that will display a simple clickable banner for the login users. It works fine until I upgrade to 2.9.0.beta5: Security Fixes, Block Hotlinked Media, PM Tagging, Search Improvements, and more
The component only shows up when I refresh the page 2~3 times and it will disappear every time when I open my site in a new tab/window. I see the same issue happens on theme-creator.
Any idea why this happens? Following is the code I use.
<script type="text/discourse-plugin" version="0.8">
const h = require("virtual-dom").h;
let user = api.getCurrentUser();
if(user){
api.createWidget("fixed-banner", {
tagName: "div.container-row",
html() {
return h('div.content', [
h('a.bannerLink', {
href: '/categories',
}, 'test'),
]);
}
});
}
</script>