gabrieldoty / simplify-scorm

Scorm 1.2 Javascript API
MIT License
230 stars 77 forks source link

lastErrorCode initial value #2

Closed gregdeluxee closed 7 years ago

gregdeluxee commented 7 years ago

Hello, (me again :D)

Just a little change to make to your lib,

You should change the line 19

from _self.lastErrorCode = null; to _self.lastErrorCode = '0';

as the "No error" code is 0 from the runtime reference.

There is some software that ask for the last error code during the initialization state and throw an error if the initial lastErrorCode is null. It might be helpful for you if you're still using your library :)

I didnt make a fork as I am not used to contribute and I don't really have time to check how to do that so I prefer to let you know the issue.

Thank again for sharing this code... Works great !

Greg

gabrieldoty commented 7 years ago

Thanks @gregdeluxee - I have updated the repo