Bug 1573580 - Handle corner case which caused inline preview to stop working r=davidwalsh

Differential Revision: https://phabricator.services.mozilla.com/D41794

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dhyey Thakore 2019-08-13 19:56:06 +00:00
Родитель 2f622224e3
Коммит b768ed3d0f
2 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -198,9 +198,9 @@ function getExpressionNameAndValue(
const property: Object = properties.find( const property: Object = properties.find(
prop => prop.name === meta.property prop => prop.name === meta.property
); );
displayValue = property.contents.value; displayValue = property && property.contents.value;
displayName += `.${meta.property}`; displayName += `.${meta.property}`;
} else { } else if (displayValue && displayValue.preview) {
const { ownProperties } = displayValue.preview; const { ownProperties } = displayValue.preview;
for (const prop in ownProperties) { for (const prop in ownProperties) {
if (prop === meta.property) { if (prop === meta.property) {

Просмотреть файл

@ -22,7 +22,6 @@ class InlinePreview extends PureComponent<Props> {
showInScopes(variable: string) { showInScopes(variable: string) {
// TODO: focus on variable value in the scopes sidepanel // TODO: focus on variable value in the scopes sidepanel
// we will need more info from parent comp // we will need more info from parent comp
console.log(`show ${variable}`);
} }
render() { render() {