@innovastudio/contentbuilder 1.4.122 → 1.4.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.4.122",
4
+ "version": "1.4.123",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "files": [
@@ -72705,7 +72705,11 @@ class LivePreview {
72705
72705
  if (this.modal.classList.contains('active')) {
72706
72706
  // let html = this.builder.html();
72707
72707
  // localStorage.setItem('preview-html', html);
72708
- if (this.builder.onPreviewOpen) this.builder.onPreviewOpen();
72708
+ try {
72709
+ if (this.builder.onPreviewOpen) this.builder.onPreviewOpen();
72710
+ } catch (e) {
72711
+ return;
72712
+ }
72709
72713
  const iframe = this.modal.querySelector('iframe');
72710
72714
  if (!this.builder.doc.querySelector('.is-wrapper')) {
72711
72715
  // ContentBuilder
@@ -72869,7 +72873,11 @@ class LivePreview {
72869
72873
  this.builder.livePreviewAlwaysReload = oriVal;
72870
72874
  }
72871
72875
  iframe.onload = () => {
72872
- if (this.builder.onPreviewContentLoad && !disableOnContentLoad) this.builder.onPreviewContentLoad();
72876
+ try {
72877
+ if (this.builder.onPreviewContentLoad && !disableOnContentLoad) this.builder.onPreviewContentLoad();
72878
+ } catch (e) {
72879
+ // Do Nothing
72880
+ }
72873
72881
  iframe.contentWindow.document.addEventListener('click', () => {
72874
72882
  iframe.focus();
72875
72883
  });
@@ -72879,7 +72887,8 @@ class LivePreview {
72879
72887
  openPreview() {
72880
72888
  // if(!this.builder.previewURL) return;
72881
72889
 
72882
- if (this.modal.classList.contains('active')) return;
72890
+ // if(this.modal.classList.contains('active')) return;
72891
+
72883
72892
  const util = this.util;
72884
72893
  const modal = this.modal;
72885
72894
  modal.classList.add('active');