From a3d73d8362962b313dcaa6c9a5bd48b5c1f38593 Mon Sep 17 00:00:00 2001 From: etaypere Date: Tue, 27 Mar 2012 19:33:02 +0300 Subject: [PATCH] error on ie9comp, ie8 and older: "Unable to get value of the property 'substring': object is null" the object is the url. --- selectivizr.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selectivizr.js b/selectivizr.js index 35d6bfc..b508074 100755 --- a/selectivizr.js +++ b/selectivizr.js @@ -410,6 +410,10 @@ References: if (!contextUrl) { contextUrl = baseUrl; } + + // IE8- bugfix + if (typeof(url) !== 'string') + return contextUrl; // protocol-relative path if (url.substring(0,2)=="//") {