Skip to content

Commit 7476b94

Browse files
committed
Fix Delay Attributes
Fixed the bug that lineDelay and characterDelay aren't parsed correctly
1 parent 5bf0c88 commit 7476b94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class TypingEffectElement extends HTMLElement {
4040
}
4141

4242
get characterDelay(): number {
43-
return Math.max(Math.min(0, Math.floor(Number(this.getAttribute('data-character-delay'))), 2_147_483_647)) || 40
43+
return Math.max(0, Math.min(Math.floor(Number(this.getAttribute('data-character-delay'))), 2_147_483_647)) || 40
4444
}
4545

4646
set characterDelay(value: number) {
@@ -51,7 +51,7 @@ class TypingEffectElement extends HTMLElement {
5151
}
5252

5353
get lineDelay(): number {
54-
return Math.max(Math.min(0, Math.floor(Number(this.getAttribute('data-line-delay'))), 2_147_483_647)) || 40
54+
return Math.max(0, Math.min(Math.floor(Number(this.getAttribute('data-line-delay'))), 2_147_483_647)) || 40
5555
}
5656

5757
set lineDelay(value: number) {

0 commit comments

Comments
 (0)