Commit d02bc7bd authored by Alain St-Denis's avatar Alain St-Denis
Browse files

rearrange code to please the test unit

parent cf0d3d32
Pipeline #6363 passed with stages
in 14 minutes and 24 seconds
......@@ -91,13 +91,16 @@ const StreamElement = {
},
methods: {
layoutAfterIframeResize() {
const iframe = document.getElementById(this.content.id).getElementsByTagName("iframe")[0]
if (iframe) {
const c = this
const resizeObs = new MutationObserver(() => {
c.onImageLoad()
})
resizeObs.observe(iframe, {attributeFilter: ["height", "style"]})
const post = document.getElementById(this.content.id)
if (post) {
const iframe = post.getElementsByTagName("iframe")[0]
if (iframe) {
const c = this
const resizeObs = new MutationObserver(() => {
c.onImageLoad()
})
resizeObs.observe(iframe, {attributeFilter: ["height", "style"]})
}
}
},
layoutAfterTwitterOEmbeds() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment