Object.getPrototypeOf fails in Chrome when given a primitive

This commit is contained in:
fkloft 2015-02-06 22:41:19 +01:00
parent 39de236459
commit 952134a4ac

View File

@ -58,7 +58,7 @@ window.extractFromStock = function() {
// finding the required method names for the botguard interface code // finding the required method names for the botguard interface code
if(topObject && Object.getPrototypeOf(topObject) == requestPrototype) { if(topObject && typeof topObject == "object" && Object.getPrototypeOf(topObject) == requestPrototype) {
var methodKey = Object var methodKey = Object
.keys(topObject) .keys(topObject)
.filter(function(key) { return typeof key == "string"; })[0]; .filter(function(key) { return typeof key == "string"; })[0];