Skip to content

Commit dff5a06

Browse files
author
Philipp Molitor
committed
fix rejection error
1 parent a2f5fc3 commit dff5a06

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib/loader.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ export class UnityLoaderService {
2626
this.script.type = 'text/javascript';
2727
this.script.async = true;
2828
this.script.src = url;
29-
this.script.onerror = () => reject();
3029
this.script.onload = () => resolve();
31-
// this.script.onerror = () =>
32-
// reject(new Error(`cannot download unity loader from: ${url}`));
30+
this.script.onerror = () =>
31+
reject(new Error(`cannot download unity loader from: ${url}`));
3332

3433
// attach
3534
this.documentHead.appendChild(this.script);

0 commit comments

Comments
 (0)