Browse Source

guard against undefined `values` in ParameterControls

Alexander Rose 5 years ago
parent
commit
6bbee58d39
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/mol-plugin/ui/controls/parameters.tsx

+ 1 - 1
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];