Skip to content

Commit

Permalink
Add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
e-halinen committed Oct 15, 2024
1 parent 0cae73a commit 87853a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/Settings/Settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ const Settings = ({
<div className="Settings__dialog-heading">Projektin asetukset</div>
<div className="Settings__dialog-input-group">
<span className="Settings__pseudo-label">Käytettävät Python-ympäristöt:</span>
{ emmePythonEnvs.map((env, index) => { return (
{ emmePythonEnvs && (emmePythonEnvs.map((env, index) => { return (
<div>
<EnvironmentOption envPath={env} isSelected={emmePythonPath === env}
setPath={setEMMEPythonPath}
removePath={removeFromEMMEPythonEnvs}/>
{ index < emmePythonEnvs.length && <PathOptionDivider/> }
</div>)})}
</div>)}))}
<button className="Settings__input-btn"
onClick={()=>{
dialog.showOpenDialog({
Expand Down

0 comments on commit 87853a4

Please sign in to comment.