This project is archived and is in readonly mode.

#1189 ✓ invalid
Tim Wienk

Global object in CommonJS environments

Reported by Tim Wienk | March 5th, 2011 @ 01:02 AM | in 2.0 (closed)

In 1.3.1 we changed our function closures to use .call(this) because the global this refers to the global scope. This change was necessary because in ES5 strict and some other environments (JScript something) this inside of a function with no context applied is undefined.

In NodeJS the global this in a file refers to the exports object, rather than the global object. So in 1.3.1 NodeJS is currently broken.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages