dharFr / badgee

Browser Console Improved
26 stars 1 forks source link

Breaks in IE9 when devtools are opened before the page is loaded #65

Closed jakub-g closed 5 years ago

jakub-g commented 6 years ago

In IE9, normally console is undefined, and things work well in such scenario, but when you open devtools before loading the page, it becomes defined (known quirk of IE...), and this breaks things somehow

image

image

Based on quick debugging, it's probably this line (that gets compiled to .bind.apply) that is mentioned in the first error: https://github.com/dharFr/badgee/blob/master/src/badgee.js#L50 (not sure what's the exact issue though, didn't dig too much into it yet).

dharFr commented 6 years ago

Weird, that case was supposed to be handled already (see https://github.com/dharFr/badgee/blob/master/src/badgee.js#L94-L103). I'll have a look. (If it's the problem I have in mind, it's cause by console.log not being a real function in IE, meaning it doesn't implement apply for example).

jakub-g commented 6 years ago

Ah yeah indeed, it's an object and not a method typeof console.log == "object" // true

[insert IE meme here]