Skip to content

Commit

Permalink
If this is undefined root is window
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeSidSmith committed Jan 27, 2015
1 parent f63e72d commit 1dcd65f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-reorderable",
"version": "1.0.1",
"version": "1.0.2",
"description": "Drag & drop, touch enabled, reorderable / sortable list, React component",
"homepage": "https://github.com/JakeSidSmith/react-reorderable",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-reorderable",
"version": "1.0.1",
"version": "1.0.2",
"description": "Drag & drop, touch enabled, reorderable / sortable list, React component",
"author": "Jake 'Sid' Smith",
"license": "MIT",
Expand Down
8 changes: 3 additions & 5 deletions reorderable.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
};

// Establish the root object, `window` in the browser, or `exports` on the server.
var root = this;
var root = this || window;

// Export for commonjs / browserify
if (typeof exports !== 'undefined') {
Expand All @@ -496,12 +496,10 @@
}

// Define for requirejs
/* jshint ignore:start */
if (typeof define === 'function' && define.amd) {
define(['react'], function(React) {
if (root && typeof root.define === 'function' && root.define.amd) {
root.define(['react'], function(React) {
return getReorderable(React);
});
}
/* jshint ignore:end */

})();

0 comments on commit 1dcd65f

Please sign in to comment.