File tree 1 file changed +3
-5
lines changed 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -491,18 +491,16 @@ class CMSEditor {
491
491
492
492
if ( script && script . textContent . length > 2 ) {
493
493
this . CMS . API . Helpers . dataBridge = JSON . parse ( script . textContent ) ;
494
- console . log ( "CMS.API.Helpers.dataBridge" , this . CMS . API . Helpers . dataBridge ) ;
495
494
} else {
496
- const regex1 = / ^ \s * W i n d o w \. C M S \. A P I \. H e l p e r s \. d a t a B r i d g e \s = \s ( .* ?) ; $ / gmu. exec ( body ) ;
497
- const regex2 = / ^ \s * W i n d o w \. C M S \. A P I \. H e l p e r s \. d a t a B r i d g e \. s t r u c t u r e \s = \s ( .* ?) ; $ / gmu. exec ( body ) ;
495
+ const regex1 = / ^ \s * W i n d o w \. C M S \. A P I \. H e l p e r s \. d a t a B r i d g e \s = \s ( .* ?) ; $ / gmu. exec ( dom . innerHTML ) ;
496
+ const regex2 = / ^ \s * W i n d o w \. C M S \. A P I \. H e l p e r s \. d a t a B r i d g e \. s t r u c t u r e \s = \s ( .* ?) ; $ / gmu. exec ( dom . innerHTML ) ;
498
497
499
498
if ( regex1 && regex2 && this . CMS ) {
500
499
this . CMS . API . Helpers . dataBridge = JSON . parse ( regex1 [ 1 ] ) ;
501
500
this . CMS . API . Helpers . dataBridge . structure = JSON . parse ( regex2 [ 1 ] ) ;
502
- console . log ( "CMS.API.Helpers.dataBridge by REGEX" , this . CMS . API . Helpers . dataBridge ) ;
503
501
} else {
504
502
// No databridge found
505
- this . CMS . API . Helpers . dataBridge = { } ;
503
+ this . CMS . API . Helpers . dataBridge = null ;
506
504
}
507
505
}
508
506
// Additional content for the page disrupts inline editing and needs to be removed
You can’t perform that action at this time.
0 commit comments