Open liftarn opened 8 years ago
The code uses a lot of instanceof and instanceof lies when a value comes from another frame or iframe. This means that jsonObj instanceof Object needs to be replaced with typeof(jsonObj) === 'object' or some other workaround. See http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/ for some ideas.
jsonObj instanceof Object
typeof(jsonObj) === 'object'
The code uses a lot of instanceof and instanceof lies when a value comes from another frame or iframe. This means that
jsonObj instanceof Object
needs to be replaced withtypeof(jsonObj) === 'object'
or some other workaround. See http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/ for some ideas.