We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5fc00ed commit 214f023Copy full SHA for 214f023
src/JavaScript/SCORM_API_wrapper.js
@@ -1,7 +1,7 @@
1
/* ===========================================================
2
3
pipwerks SCORM Wrapper for JavaScript
4
-v1.1.20111123
+v1.1.20121005
5
6
Created by Philip Hutchison, January 2008
7
https://github.com/pipwerks/scorm-api-wrapper
@@ -790,6 +790,9 @@ pipwerks.SCORM.quit = pipwerks.SCORM.connection.terminate;
790
pipwerks.UTILS.StringToBoolean = function(value){
791
var t = typeof value;
792
switch(t){
793
+ //typeof new String("true") === "object", so handle objects as string via fall-through.
794
+ //See https://github.com/pipwerks/scorm-api-wrapper/issues/3
795
+ case "object":
796
case "string": return (/(true|1)/i).test(value);
797
case "number": return !!value;
798
case "boolean": return value;
0 commit comments