IE8 Bug #13

Closed
arlolra opened this Issue Feb 9, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@arlolra
Contributor

arlolra commented Feb 9, 2012

For some odd reason, IE8 isn't happy with this:
https://github.com/visionmedia/express-expose/blob/master/lib/express-expose.js#L218

var test = test || {}; causes a problem. I'm guessing it has something to do with hoisting replacing the global variable.

In any case, swapping this,

return (i ? '' : 'var ') + part + ' = ' + part + ' || {};';

with this,

return (i ? '' : 'window.') + part + ' = window.' + part + ' || {};';

gets around the problem. Not sure you want to do that, just thought I'd point it out.

@tj

This comment has been minimized.

Show comment Hide comment
@tj

tj Feb 9, 2012

Owner

crap yeah that's a bug on my part

Owner

tj commented Feb 9, 2012

crap yeah that's a bug on my part

@arlolra

This comment has been minimized.

Show comment Hide comment
@arlolra

arlolra Feb 9, 2012

Contributor

want me to turn it into a pull request?

Contributor

arlolra commented Feb 9, 2012

want me to turn it into a pull request?

@tj

This comment has been minimized.

Show comment Hide comment
@tj

tj Feb 9, 2012

Owner

sure! that would be great

Owner

tj commented Feb 9, 2012

sure! that would be great

@tj tj closed this in 413628d Feb 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment