File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
browser/admin/src/integrator Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -121,12 +121,16 @@ class SettingIframe {
121
121
if ( ! element ) return ;
122
122
123
123
window . accessToken = element . dataset . accessToken ;
124
+ if ( ! window . accessToken ) {
125
+ throw new Error ( 'Access token is missing in initial variables.' ) ;
126
+ }
127
+
124
128
window . accessTokenTTL = element . dataset . accessTokenTtl ;
125
129
window . enableDebug = element . dataset . enableDebug === 'true' ;
126
130
window . enableAccessibility = element . dataset . enableAccessibility === 'true' ;
127
- window . wopiSettingBaseUrl = element . dataset . wopiSettingBaseUrl ;
128
- window . iframeType = element . dataset . iframeType ;
129
- window . cssVars = element . dataset . cssVars ;
131
+ window . wopiSettingBaseUrl = element . dataset . wopiSettingBaseUrl ?? "" ;
132
+ window . iframeType = element . dataset . iframeType || "user" ;
133
+ window . cssVars = element . dataset . cssVars || "" ;
130
134
if ( window . cssVars ) {
131
135
window . cssVars = atob ( window . cssVars ) ;
132
136
const sheet = new CSSStyleSheet ( ) ;
You can’t perform that action at this time.
0 commit comments