documentcloud/underscore — Issue #371: 1.2.2 not working with require.js
Author: jstrimpel
Created: 2011-11-17 00:16:32+00:00
State: open

When underscore 1.2.2 is loaded as follows it is not being assigned to the window object causing backbone.js fail because it cannot locate the dependency. 1.2.0 is assigned to window object correctly when loaded via require. I checked the DOM and the script tag is there along with the JS. It is just not in the window object.

require(['underscore.'], function (_) {
console.log(window._); // null
console.log(_); // null
});