-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update xhr-loader.ts #6359
base: master
Are you sure you want to change the base?
Update xhr-loader.ts #6359
Conversation
This Line have issue it's throwing error while run time
Can you provide steps to reproduce?
That is TypeScript. It is not intended for runtime. |
this.callbacks!.onError( | ||
this.callbacks.onError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The !
is a TypeScript non-null assertion operator. It is not runtime code. This code must be converted from TS to JS before it is run.
this.callbacks!
appears twice in this file. If we decide to remove the non-null assertions, we must remove both, and add null checks before them, like } else if (this.callbacks) {
or if (!this.callbacks) { return; }
for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is Throwing Error as OnError on xhrrequest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using hls as multipalyer and controlling all through a common controller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to remove the non-null assertions, you must remove both, and add null checks before each of them.
This Line have issue it's throwing error while run time
This PR will... resolve the error while run time
Are there any points in the code the reviewer needs to double check?
Resolves issues: xhrLoader issue
Checklist