From 6bbee58d394902658973d59e843bebcaa97c1b11 Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Wed, 16 Oct 2019 16:42:14 -0700 Subject: [PATCH] guard against undefined `values` in ParameterControls --- src/mol-plugin/ui/controls/parameters.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mol-plugin/ui/controls/parameters.tsx b/src/mol-plugin/ui/controls/parameters.tsx index 486ce2978..663088427 100644 --- a/src/mol-plugin/ui/controls/parameters.tsx +++ b/src/mol-plugin/ui/controls/parameters.tsx @@ -34,7 +34,7 @@ export class ParameterControls<P extends PD.Params> extends React.PureComponent< const params = this.props.params; const values = this.props.values; const keys = Object.keys(params); - if (keys.length === 0) return null; + if (keys.length === 0 || values === undefined) return null; return <> {keys.map(key => { const param = params[key]; -- GitLab