Skip to content

Commit 9d0837a

Browse files
committed
remove unecessary check for id since the base class is making sure that it always has an ID
1 parent 190ae39 commit 9d0837a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pyscriptjs/src/components/pyscript.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,8 @@ export class PyScript extends BaseEvalElement {
140140
// to create a new output div to output to
141141

142142
// Let's check if we have an id first and create one if not
143-
if (!this.id){
144-
this.id = `pyid-${Date.now()}`
145-
}
146143
this.outputElement = document.createElement('div');
147-
const exec_id = this.getAttribute("exec-id");
144+
const exec_id = this.getAttribute("exec-id");
148145
this.outputElement.id = this.id + (exec_id ? "-"+exec_id : "");
149146

150147
// add the output div id if there's not output pre-defined

0 commit comments

Comments
 (0)