adobe-research / theseus

A pretty darn cool JavaScript debugger for Brackets
Other
1.34k stars 69 forks source link

Standard objects (Array, String, Function) are undefined #15

Closed ElliotChong closed 11 years ago

ElliotChong commented 11 years ago

When including Lodash in a webpage I'm seeing an error where standard JS objects are undefined (i.e.: Array, String, Function, etc.) when accessing them globally; however, they are accessible on the window object.

image

image

Loading Lodash outside of Theseus does not have this error occur. I've disabled loading all other scripts but Lodash to ensure there aren't any confounding factors.

alltom commented 11 years ago

Great catch!

Bug: Lodash defines a local variable named Array with no default value, and when the function responsible for giving it a value executes, fondue immediately tries to use Array.prototype.slice to get a copy of the arguments and fails.

alltom commented 11 years ago

The release with this fix is pending and I really hope to have it out this week. For now, you can apply that patch locally if you like (it's tiny).

ElliotChong commented 11 years ago

Thanks as always Tom!