Skip to content

Commit

Permalink
Fixes #3566 loading with '''ES6''' script loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed May 13, 2015
1 parent 6ef5746 commit 5a6ffcb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

(function(root, factory) {

// Handle ES6 loaders with no access to global "this".
if (!root && typeof window == 'object') root = window;
if (!root && typeof global == 'object') root = global;

// Set up Backbone appropriately for the environment. Start with AMD.
if (typeof define === 'function' && define.amd) {
define(['underscore', 'jquery', 'exports'], function(_, $, exports) {
Expand Down

1 comment on commit 5a6ffcb

@megawac
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think jashkenas/underscore#2153 is more comprehensive as it includes webworker support

Please sign in to comment.