keithclark/selectivizr — Issue #28: IE onload error [solved]
Author: john-warpdevelopment
Created: 2012-02-14 08:40:51+00:00
State: open

I was using IE9 compatibility mode to simulate IE7 (issue was also in IE8 document mode) included selectivizr v1.0.3b and on load it would error in the resolveUrl function on the line

```javascript
if (url.charAt(0) == "/") {
return getProtocolAndHost(contextUrl) + url;
}
```

The error was in the if, the variable url was undefined. So without really knowing what that function does, i seem to have been able to solve the issue by adding this line near the top of the function

```javascript
if (!url) return "";
```