Skip to content

Commit 3ba7fe8

Browse files
PB-265: Video background for Banner
- fix video error
1 parent d18ffeb commit 3ba7fe8

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/banner/preview.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/slide/preview.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/banner/preview.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,14 @@ export default class Preview extends BasePreview {
132132
},
133133
);
134134
// @ts-ignore
135-
this.wrapper.jarallax.video && this.wrapper.jarallax.video.on("started", () => {
136-
// @ts-ignore
137-
if (this.wrapper.jarallax.$video) {
135+
this.wrapper.jarallax &&
136+
this.wrapper.jarallax.video &&
137+
this.wrapper.jarallax.video.on("started", () => {
138138
// @ts-ignore
139-
this.wrapper.jarallax.$video.style.visibility = "visible";
140-
}
139+
if (this.wrapper.jarallax && this.wrapper.jarallax.$video) {
140+
// @ts-ignore
141+
this.wrapper.jarallax.$video.style.visibility = "visible";
142+
}
141143
});
142144
});
143145
}

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/slide/preview.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,15 @@ export default class Preview extends BasePreview {
138138
},
139139
);
140140
// @ts-ignore
141-
this.wrapper.jarallax.video && this.wrapper.jarallax.video.on("started", () => {
142-
// @ts-ignore
143-
if (this.wrapper.jarallax.$video) {
141+
this.wrapper.jarallax &&
142+
this.wrapper.jarallax.video &&
143+
this.wrapper.jarallax.video.on("started", () => {
144144
// @ts-ignore
145-
this.wrapper.jarallax.$video.style.visibility = "visible";
146-
}
147-
});
145+
if (this.wrapper.jarallax && this.wrapper.jarallax.$video) {
146+
// @ts-ignore
147+
this.wrapper.jarallax.$video.style.visibility = "visible";
148+
}
149+
});
148150
});
149151
}
150152

0 commit comments

Comments
 (0)