Shim error in IE8
Closed this issue · 5 comments
Hi,
I’m getting the following error in IE8:
'shim' is null or not an object (fallback.js, line 142, character 4)
The line is question is:
if (!me.is_object(options.shim)) {
Any idea how to fix this?
Thanks,
Dylan
@dylanparry Can you supply a Plunker?
Yes, I’ve created one at http://plnkr.co/x1jcCNgrSZQAQPEaHpuW but it seems that Plunker doesn’t work with IE8, or at least I can’t even get my page to appear when I try it...
The basic code is as follows:
fallback.load({
leaflet: ['//cdn.leafletjs.com/leaflet-0.7.3/leaflet.css', '/content/leaflet/leaflet.css'],
fontAwesome: ['//cdn.jsdelivr.net/fontawesome/4.2.0/css/font-awesome.min.css', '/content/font-awesome.min.css']
});
with the latest fallback.js included at an external file. As you can see, I’m only using fallback to load in CSS.
@dylanparry It's specialness with IE8.
Object.prototype.toString.call(undefined)
returns [object Object]
instead of [object Undefined]
.
For a quick fix simply specify the shim
.
fallback.list({
// ...libs
}, {
shim: {}
});
Will get around to it fixing it this week unless you want to make a PR.
v2 should be out in another week or so, with a full test suite. Hopefully to avoid issues like these popping up.
Thanks. That seems to have fixed it. I actually thought I’d tried that already, but I guess I didn’t...!
@dylanparry Fixed in v1.1.7, please let me know. Sorry for the delay, been extremely busy.