`H5P.getLibraryPath(<lib>)` returns `"undefined/<...>"`
See original GitHub issueWhen running a H5P using the new librariesPath
parameter that needs to call H5P.getLibraryPath(<lib>)
(for example to load assets) that call returns "undefined/<...>"
.
This.librariesPath = <path>
is correctly written to the console, however, and everything else runs correctly, except for the fact that assets aren’t loaded because the path is wrong.
Also, when I don’t specify a librariesPath
, I immediately get This.librariesPath = [object Object]
written to the console, and the main H5P library isn’t even loaded because it tries to load /[object%20Object]/<lib>/library.json
.
This happens when I build from current master (85c11382a84dd17989a252f427ecc56c1c0c82be), which appears to be the correct version for 2.1.1 if I’m parsing the commit history correctly.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Seems I wasn’t paying attention for the last PR, this should be fixed now, and tagged in 2.1.2. Also have setup CI to hopefully catch this sort of thing…
Ah yes, that’s a lot cleaner than just fixing the hack, of course. You’re welcome!
Also I can confirm that it works now - thanks a lot!