When checking Asynchronous Module Definition availability, look for 'function' type explicitly #2847
Labels
status: archived
Archived and locked; will not be updated
type: bug
Something isn't working correctly
Milestone
Have you read the FAQ and checked for duplicate open issues?
Yes.
What version of Shaka Player are you using?
Master.
Can you reproduce the issue with our latest release version?
Yes.
Can you reproduce the issue with the latest code from
master
?Yes.
Are you using the demo app or your own custom app?
Own custom app.
If custom app, can you reproduce the issue using our demo app?
N/A.
What browser and OS are you using?
N/A.
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A.
What are the manifest and license server URIs?
N/A.
What did you do?
Include shaka-player.compiled.js.
What did you expect to happen?
No exception should be thrown.
What actually happened?
Shaka is trying to check for "define.amd" of a null object.
In build/wrapper.template.js there is a line:
However, it happened so that on some websites where shaka is embedded there is a global
define
object set to null.I think a better check here would be:
This would avoid being triggered for
define = null
. Also, this is what some other libraries are using, e.g.:https://devhints.io/umdjs
https://github.com/simontabor/jquery-toggles/blob/master/toggles.js#L266
https://github.com/wieringen/tinyscrollbar/blob/master/lib/tinyscrollbar.js#L385
The text was updated successfully, but these errors were encountered: