@@ -9,7 +9,7 @@ import * as React from 'react';
99import { CellMatcher } from '../../client/datascience/cellMatcher' ;
1010import { generateMarkdownFromCodeLines } from '../../client/datascience/common' ;
1111import { HistoryMessages , IHistoryMapping } from '../../client/datascience/history/historyTypes' ;
12- import { CellState , ICell , IHistoryInfo , IJupyterVariable } from '../../client/datascience/types' ;
12+ import { CellState , ICell , IHistoryInfo , IJupyterVariable , IJupyterVariablesResponse } from '../../client/datascience/types' ;
1313import { IMessageHandler , PostOffice } from '../react-common/postOffice' ;
1414import { getSettings , updateSettings } from '../react-common/settingsReactSide' ;
1515import { StyleInjector } from '../react-common/styleInjector' ;
@@ -784,16 +784,16 @@ export class MainPanel extends React.Component<IMainPanelProps, IMainPanelState>
784784 // tslint:disable-next-line:no-any
785785 private getVariablesResponse = ( payload ?: any ) => {
786786 if ( payload ) {
787- const variables = payload as IJupyterVariable [ ] ;
787+ const variablesResponse = payload as IJupyterVariablesResponse ;
788788
789789 // Check to see if we have moved to a new execution count only send our update if we are on the same count as the request
790- if ( variables . length > 0 && variables [ 0 ] . executionCount !== undefined && variables [ 0 ] . executionCount === this . currentExecutionCount ) {
790+ if ( variablesResponse . executionCount === this . currentExecutionCount ) {
791791 if ( this . variableExplorerRef . current ) {
792- this . variableExplorerRef . current . newVariablesData ( variables ) ;
792+ this . variableExplorerRef . current . newVariablesData ( variablesResponse . variables ) ;
793793 }
794794
795795 // Now put out a request for all of the sub values for the variables
796- variables . forEach ( this . refreshVariable ) ;
796+ variablesResponse . variables . forEach ( this . refreshVariable ) ;
797797 }
798798 }
799799 }
0 commit comments