@@ -282,7 +282,8 @@ export class Playground extends React.PureComponent<Props & DocsState, State> {
282
282
}
283
283
render ( ) {
284
284
const { sessions, selectedSessionIndex } = this . state
285
- const { isEndpoint, settings : { theme } } = this . props
285
+ const { isEndpoint } = this . props
286
+ const theme = this . props . settings [ 'editor.theme' ]
286
287
const selectedEndpointUrl = isEndpoint ? location . href : this . getEndpoint ( )
287
288
const isGraphcoolUrl = this . isGraphcoolUrl ( selectedEndpointUrl )
288
289
@@ -358,7 +359,7 @@ export class Playground extends React.PureComponent<Props & DocsState, State> {
358
359
schemaFetcher = { this . schemaFetcher }
359
360
fixedEndpoint = { this . props . fixedEndpoints }
360
361
sharing = { {
361
- localTheme : this . props . settings . theme ,
362
+ localTheme : this . props . settings [ 'editor .theme' ] ,
362
363
onShare : this . share ,
363
364
onToggleHistory : this . toggleShareHistory ,
364
365
onToggleAllTabs : this . toggleShareAllTabs ,
@@ -816,7 +817,7 @@ export class Playground extends React.PureComponent<Props & DocsState, State> {
816
817
const currentActiveSession =
817
818
this . state && this . state . sessions [ this . state . selectedSessionIndex ]
818
819
const headers =
819
- this . props . settings . reuseHeaders && currentActiveSession
820
+ this . props . settings [ 'editor .reuseHeaders' ] && currentActiveSession
820
821
? currentActiveSession . headers
821
822
: ''
822
823
if ( session ) {
@@ -1014,11 +1015,13 @@ export class Playground extends React.PureComponent<Props & DocsState, State> {
1014
1015
jsonVariables =
1015
1016
headers && headers . trim ( ) !== '' ? JSON . parse ( headers ) : undefined
1016
1017
} catch ( error ) {
1017
- throw new Error ( `Headers are invalid JSON: ${ error . message } .` )
1018
+ /* tslint:disable-next-line */
1019
+ console . error ( `Headers are invalid JSON: ${ error . message } .` )
1018
1020
}
1019
1021
1020
1022
if ( typeof jsonVariables !== 'object' ) {
1021
- throw new Error ( 'Headers are not a JSON object.' )
1023
+ /* tslint:disable-next-line */
1024
+ console . error ( 'Headers are not a JSON object.' )
1022
1025
}
1023
1026
1024
1027
return jsonVariables
0 commit comments