pipwerks / scorm-api-wrapper

The pipwerks SCORM API Wrapper
http://pipwerks.com
357 stars 125 forks source link

Update SCORM_API_wrapper.js #10

Closed blake-newman closed 8 years ago

blake-newman commented 9 years ago

Some LMS's i have experienced are reporting an erorrCode back as NaN for if there is no error. This is an issue on there part and breaks the wrapper.

This doesn't break anything for LMS's that report back normally in my experience.

pipwerks commented 9 years ago

Irritating when LMSs don't conform, isn't it? :)

Thanks for the proposal. I think the better solution would be to address the NaN in the pipwerks.SCORM.debug.getCode function, which is where parseInt is run -- apparently I overlooked the fact that parseInt converts an empty string to NaN.