Skip to content

Commit 6a236d1

Browse files
authored
fix: block infinite retries when maxRetryCount is null (#648)
2 parents 85a2ed1 + b5d8117 commit 6a236d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/textures/Texture.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ export abstract class Texture extends EventEmitter {
292292
}
293293

294294
load(): void {
295+
if (this.maxRetryCount === null && this.retryCount > 0) {
296+
return;
297+
}
298+
295299
if (this.maxRetryCount !== null && this.retryCount > this.maxRetryCount) {
296300
// We've exceeded the max retry count, do not attempt to load again
297301
return;

0 commit comments

Comments
 (0)