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

remove unecessary check for id since the base class is making sure that it always has an ID

This commit is contained in:
Fabio Pliger
2022-04-22 11:55:18 -05:00
parent 190ae39690
commit 9d0837abec

View File

@@ -140,11 +140,8 @@ export class PyScript extends BaseEvalElement {
// to create a new output div to output to
// Let's check if we have an id first and create one if not
if (!this.id){
this.id = `pyid-${Date.now()}`
}
this.outputElement = document.createElement('div');
const exec_id = this.getAttribute("exec-id");
const exec_id = this.getAttribute("exec-id");
this.outputElement.id = this.id + (exec_id ? "-"+exec_id : "");
// add the output div id if there's not output pre-defined