Skip to content

Commit

Permalink
Moved 'use strict' in UMD patterns to function scope.
Browse files Browse the repository at this point in the history
  • Loading branch information
bre1470 authored and TorsteinHonsi committed Nov 26, 2021
1 parent 1aaddf4 commit 8f7d1ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/templates/umd-module.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
Expand All @@ -11,6 +10,7 @@
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
'use strict';
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
Expand Down
2 changes: 1 addition & 1 deletion src/templates/umd-standalone.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use strict';
(function (root, factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
Expand All @@ -16,6 +15,7 @@
root.@name = factory(root);
}
}(typeof window !== 'undefined' ? window : this, function (window) {
'use strict';
var _modules = {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
Expand Down

0 comments on commit 8f7d1ad

Please sign in to comment.