You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is resolved and thus library.userDatas may be set after H5P.newRunnable wants to use the parameter.
This is currently not an issue, because all the H5P plugins set the contentUserData property in the H5PIntegration object, but it will not work otherwise although the code suggests it would.
The text was updated successfully, but these errors were encountered:
Is there a chance that a PR which fixes this gets merged? I'm working on a custom H5P integration where user data is only available asynchronously, so fixing this issue would be quite convenient :)
h5p-php-library/js/h5p.js
Lines 107 to 137 in 22115c0
The call to
H5P.getUserData
is supposed to populatelibrary.userDatas
with the previous state, so it can be used in in the call toH5P.newRunnable
inh5p-php-library/js/h5p.js
Line 137 in 22115c0
This works fine if the previous state is set in the H5PIntegration object and fetched in
h5p-php-library/js/h5p.js
Line 2402 in 22115c0
Otherwise. however
H5P.getUserData
will not resolve before the asynchronous call tocontentUserDataAjax
inh5p-php-library/js/h5p.js
Line 2338 in 22115c0
is resolved and thus
library.userDatas
may be set afterH5P.newRunnable
wants to use the parameter.This is currently not an issue, because all the H5P plugins set the
contentUserData
property in theH5PIntegration
object, but it will not work otherwise although the code suggests it would.The text was updated successfully, but these errors were encountered: