Remove superfluous end pos seeks, fix validation bug

This commit is contained in:
Vanilagy
2026-03-27 21:29:47 +01:00
parent 94678dd356
commit 7b70756961
5 changed files with 2 additions and 11 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ export abstract class Target {
onfinalized: (() => unknown) | null = null;
slice(offset: number) {
if (!Number.isInteger(offset) && offset < 0) {
if (!Number.isInteger(offset) || offset < 0) {
throw new TypeError('offset must be a non-negative integer.');
}