adaptlearning / adapt-contrib-xapi

TinCan/xAPI extension for the Adapt Framework
GNU General Public License v3.0
12 stars 28 forks source link

Fixes error identifier collision in getState #26

Closed mediabounds closed 6 years ago

mediabounds commented 6 years ago

error is already defined in this scope which causes the uglifier (when building the Adapt course) to incorrectly mangle the variables in this function leading to a JavaScript error when restoring state.

FWIW, here's a screenshot of the final course output before this fix is applied.

uglified

The callback error parameter is mangled as n, but the callback function checks for the existence of an l variable, which doesn't exist, causing an execution error.

brian-learningpool commented 6 years ago

Thanks @mediabounds!