File tree Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 11out /
22node_modules /
3+ .idea /
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ export const configBase = {
2727 iframe : {
2828 iframeOrigin : '' ,
2929 iframeSrcPath : '' ,
30- shouldLoadIframeMinimized : true ,
3130 } ,
3231} ;
3332
Original file line number Diff line number Diff line change @@ -156,13 +156,16 @@ export class IframeLoader extends Loader {
156156 }
157157
158158 load ( configParam = { } ) {
159- this . config . iframe = this . config . iframe || { } ;
160- this . config . iframe . iframeSrcPath = this . mergeSrcPath ( configParam ) ;
161-
162159 return super . load ( configParam )
163160 . then ( ( ) => {
164161 // assign API to this object to make calls more succint
165162 this . api = this . compLoader . api ;
163+ // make sure iframe and iframeSrcPath are set to values if not
164+ // configured by standard mechanisms. At this point, default
165+ // values from ./defaults/loader.js will be used.
166+ this . config . iframe = this . config . iframe || { } ;
167+ this . config . iframe . iframeSrcPath = this . config . iframe . iframeSrcPath ||
168+ this . mergeSrcPath ( configParam ) ;
166169 } ) ;
167170 }
168171
Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ export class IframeComponentLoader {
6161 this . config . iframe . iframeOrigin =
6262 this . config . parentOrigin || window . location . origin ;
6363 }
64+ if ( iframeConfig . shouldLoadIframeMinimized === undefined ) {
65+ this . config . iframe . shouldLoadIframeMinimized = true ;
66+ }
6467 // assign parentOrigin if not found in config
6568 if ( ! ( this . config . parentOrigin ) ) {
6669 this . config . parentOrigin =
@@ -102,6 +105,11 @@ export class IframeComponentLoader {
102105 console . error ( 'missing parentOrigin config field' ) ;
103106 return false ;
104107 }
108+ if ( ! ( 'shouldLoadIframeMinimized' in iframeConfig ) ) {
109+ console . error ( 'missing shouldLoadIframeMinimized config field' ) ;
110+ return false ;
111+ }
112+
105113 return true ;
106114 }
107115
You can’t perform that action at this time.
0 commit comments