mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
fix(director): reject cancellation during the final asset stream read
This commit is contained in:
1 parent
0265ad4c19
commit
cd7c23b36f
4 files changed
+49
No files matched your search
@@ -41,6 +41,7 @@ export function createAssetDirectorySource({
|
||||
for (;;) {
|
||||
signal?.throwIfAborted();
|
||||
const { done, value } = await reader.read();
|
||||
signal?.throwIfAborted();
|
||||
if (done) break;
|
||||
length += value.byteLength;
|
||||
if (length > maxBytes) throw new Error('Asset exceeds byte limit');
|
||||
|
||||
Reference in new issue
Block a user