DEV: ensures container is not destroyed before showing tooltip (#13992)
In fast tests it could results in an error.
This commit is contained in:
parent
2efe91f49f
commit
4ca34940d3
|
@ -130,8 +130,12 @@ export default {
|
|||
name: "discourse-local-dates",
|
||||
|
||||
showDatePopover(event) {
|
||||
const siteSettings = getOwner(this).lookup("site-settings:main");
|
||||
const owner = getOwner(this);
|
||||
if (owner.isDestroyed || owner.isDestroying) {
|
||||
return;
|
||||
}
|
||||
|
||||
const siteSettings = owner.lookup("site-settings:main");
|
||||
if (event?.target?.classList?.contains("discourse-local-date")) {
|
||||
showPopover(event, {
|
||||
htmlContent: buildHtmlPreview(event.target, siteSettings),
|
||||
|
|
Loading…
Reference in New Issue