1
0
mirror of https://github.com/pyscript/pyscript.git synced 2022-05-01 19:47:48 +03:00

Don't fail on an empty <py-env></py-env>

This commit is contained in:
Mateusz Paprocki
2022-04-14 08:42:01 +02:00
parent 893a381ee6
commit dece4734ba

View File

@@ -39,7 +39,11 @@ export class PyEnv extends HTMLElement {
let env = [];
let paths = [];
this.environment = jsyaml.load(this.code);
if (this.environment === undefined)
return
for (let entry of this.environment) {
if (typeof entry == "string" ){
env.push(entry);