Skip to content

Commit

Permalink
Always look for state & props (resolves #34)
Browse files Browse the repository at this point in the history
  • Loading branch information
andykog committed Aug 30, 2018
1 parent 116c216 commit 0d627d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Fixed
- Props & state not displayed when on component view (#34)

## [0.9.18] - 2018-6-16
### Added
Expand Down
6 changes: 5 additions & 1 deletion src/backend/mobxReactNodesTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ export default (bridge) => {
for (const mobxid in collections) {
if (Object.prototype.hasOwnProperty.call(collections, mobxid)) {
const { mobxReact } = collections[mobxid];
const component = mobxReact && mobxReact.componentByNodeRegistery.get(node);
let component = mobxReact && mobxReact.componentByNodeRegistery.get(node);
if (component) {
component = Object.assign({
props: component.props,
state: component.state,
}, component);
mobxIdsByComponent.set(component, mobxid);
return component;
}
Expand Down

0 comments on commit 0d627d1

Please sign in to comment.