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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user