Skip to content

Commit d3e2d18

Browse files
committed
destructure newProps to get _dash_error.
1 parent 33b79b5 commit d3e2d18

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dash/dash-renderer/src/TreeContainer.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,17 @@ class BaseTreeContainer extends Component {
136136

137137
const oldProps = this.getLayoutProps();
138138
const {id} = oldProps;
139+
const {_dash_error, ...rest} = newProps;
139140
const changedProps = pickBy(
140141
(val, key) => !equals(val, oldProps[key]),
141-
dissoc('_dash_error', newProps)
142+
rest
142143
);
143144

144-
if (newProps._dash_error) {
145+
if (_dash_error) {
145146
_dashprivate_dispatch(
146147
onError({
147148
type: 'frontEnd',
148-
error: newProps._dash_error
149+
error: _dash_error
149150
})
150151
);
151152
}

0 commit comments

Comments
 (0)