From 952134a4ac2ecb13ee920ba8d2913ab0b016867e Mon Sep 17 00:00:00 2001 From: fkloft Date: Fri, 6 Feb 2015 22:41:19 +0100 Subject: [PATCH] Object.getPrototypeOf fails in Chrome when given a primitive --- code/extract_niantic_parameters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/extract_niantic_parameters.js b/code/extract_niantic_parameters.js index 7c2c94ea..947d670d 100644 --- a/code/extract_niantic_parameters.js +++ b/code/extract_niantic_parameters.js @@ -58,7 +58,7 @@ window.extractFromStock = function() { // 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 .keys(topObject) .filter(function(key) { return typeof key == "string"; })[0];