Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dece473

Browse files
committed
Don't fail on an empty <py-env></py-env>
1 parent 893a381 commit dece473

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pyscriptjs/src/components/pyenv.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ export class PyEnv extends HTMLElement {
3939

4040
let env = [];
4141
let paths = [];
42+
4243
this.environment = jsyaml.load(this.code);
44+
if (this.environment === undefined)
45+
return
46+
4347
for (let entry of this.environment) {
4448
if (typeof entry == "string" ){
4549
env.push(entry);

0 commit comments

Comments
 (0)