Skip to content

Commit 6f1f6cc

Browse files
committed
Add some JS to JS template
1 parent 8aead03 commit 6f1f6cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

twitchio/ext/overlays/static/scripts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ async function prepareData(data) {
3535

3636
for (const part of data.parts) {
3737
const content = part.content;
38-
const anim = part.animation;
39-
const speed = part.speed;
40-
const fontSize = part.size;
38+
const anim = part.animation || "";
39+
const speed = part.speed || "";
40+
const fontSize = part.size || 22;
4141

4242
let html = `<span style="font-size: ${fontSize}px;" class="animate__animated animate__infinite${anim}${speed}">${content}</span>`;
4343
element.insertAdjacentHTML("beforeend", html);

0 commit comments

Comments
 (0)