mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Revert back to use did-insert
hook
This commit is contained in:
parent
d2ab69aeb6
commit
00db25e314
2 changed files with 11 additions and 0 deletions
|
@ -4,5 +4,6 @@
|
|||
frameborder="0"
|
||||
title="Explore"
|
||||
{{did-update this.handleDarkModeChange this.feature.nightShift}}
|
||||
{{did-insert this.setup}}
|
||||
...attributes
|
||||
></iframe>
|
|
@ -17,6 +17,16 @@ export default class GhExploreIframe extends Component {
|
|||
window.removeEventListener('message', this.handleIframeMessage);
|
||||
}
|
||||
|
||||
@action
|
||||
setup() {
|
||||
// Only begin setup when Explore window is toggled open
|
||||
// to avoid unnecessary loading of assets
|
||||
if (this.explore.exploreWindowOpen) {
|
||||
console.log('Rebuild');
|
||||
this.explore.getExploreIframe().src = this.explore.getIframeURL();
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
async handleIframeMessage(event) {
|
||||
if (this.isDestroyed || this.isDestroying) {
|
||||
|
|
Loading…
Add table
Reference in a new issue