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 @@ -79,11 +79,15 @@ class SettingIframe {
79
79
if ( ! element ) return ;
80
80
81
81
window . accessToken = element . dataset . accessToken ;
82
+ if ( ! window . accessToken ) {
83
+ throw new Error ( 'Access token is missing in initial variables.' ) ;
84
+ }
85
+
82
86
window . accessTokenTTL = element . dataset . accessTokenTtl ;
83
87
window . enableDebug = element . dataset . enableDebug === 'true' ;
84
- window . wopiSettingBaseUrl = element . dataset . wopiSettingBaseUrl ;
85
- window . iframeType = element . dataset . iframeType ;
86
- window . cssVars = element . dataset . cssVars ;
88
+ window . wopiSettingBaseUrl = element . dataset . wopiSettingBaseUrl ?? '' ;
89
+ window . iframeType = element . dataset . iframeType || 'user' ;
90
+ window . cssVars = element . dataset . cssVars ?? '' ;
87
91
if ( window . cssVars ) {
88
92
window . cssVars = atob ( window . cssVars ) ;
89
93
const sheet = new CSSStyleSheet ( ) ;
You can’t perform that action at this time.
0 commit comments