Skip to content

Commit

Permalink
Merge pull request #125 from cdata/support-strict-mode
Browse files Browse the repository at this point in the history
Explicitly detect browser global in strict mode.
  • Loading branch information
addyosmani authored Oct 13, 2017
2 parents 692e999 + 1deb860 commit 36fd113
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion templates/amdWeb.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// Browser globals
root.amdWeb = factory(root.b);
}
}(this, function (b) {
}(typeof self !== 'undefined' ? self : this, function (b) {
// Use b in some fashion.

// Just return a value to define the module export.
Expand Down
2 changes: 1 addition & 1 deletion templates/amdWebGlobal.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// Browser globals
root.amdWebGlobal = factory(root.b);
}
}(this, function (b) {
}(typeof self !== 'undefined' ? self : this, function (b) {
// Use b in some fashion.

// Just return a value to define the module export.
Expand Down
2 changes: 1 addition & 1 deletion templates/commonjsStrict.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// Browser globals
factory((root.commonJsStrict = {}), root.b);
}
}(this, function (exports, b) {
}(typeof self !== 'undefined' ? self : this, function (exports, b) {
// Use b in some fashion.

// attach properties to the exports object to define
Expand Down
2 changes: 1 addition & 1 deletion templates/commonjsStrictGlobal.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// Browser globals
factory((root.commonJsStrictGlobal = {}), root.b);
}
}(this, function (exports, b) {
}(typeof self !== 'undefined' ? self : this, function (exports, b) {
// Use b in some fashion.

// attach properties to the exports object to define
Expand Down
4 changes: 2 additions & 2 deletions templates/returnExports.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// Browser globals (root is window)
root.returnExports = factory(root.b);
}
}(this, function (b) {
}(typeof self !== 'undefined' ? self : this, function (b) {
// Use b in some fashion.

// Just return a value to define the module export.
Expand All @@ -51,7 +51,7 @@
// Browser globals (root is window)
root.returnExports = factory();
}
}(this, function () {
}(typeof self !== 'undefined' ? self : this, function () {

// Just return a value to define the module export.
// This example returns an object, but the module
Expand Down
2 changes: 1 addition & 1 deletion templates/returnExportsGlobal.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// Browser globals
root.returnExportsGlobal = factory(root.b);
}
}(this, function (b) {
}(typeof self !== 'undefined' ? self : this, function (b) {
// Use b in some fashion.

// Just return a value to define the module export.
Expand Down

0 comments on commit 36fd113

Please sign in to comment.