Skip to content

Commit

Permalink
Fixes requirejs/requirejs#1854, pollution
Browse files Browse the repository at this point in the history
  • Loading branch information
jrburke committed Jul 16, 2024
1 parent acec536 commit ecc356a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions dist/r.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license r.js 2.3.6 Copyright jQuery Foundation and other contributors.
* @license r.js 2.3.6+ Tue, 16 Jul 2024 05:19:14 GMT Copyright jQuery Foundation and other contributors.
* Released under MIT license, http://github.com/requirejs/r.js/LICENSE
*/

Expand All @@ -19,7 +19,7 @@ var requirejs, require, define, xpcUtil;
(function (console, args, readFileFunc) {
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci,
version = '2.3.6',
version = '2.3.6 Tue, 16 Jul 2024 05:19:14 GMT',
jsSuffixRegExp = /\.js$/,
commandOption = '',
useLibLoaded = {},
Expand Down Expand Up @@ -282,7 +282,8 @@ var requirejs, require, define, xpcUtil;
contexts = {},
cfg = {},
globalDefQueue = [],
useInteractive = false;
useInteractive = false,
disallowedProps = ['__proto__', 'constructor'];

//Could match something like ')//comment', do not lose the prefix to comment.
function commentReplace(match, singlePrefix) {
Expand Down Expand Up @@ -343,7 +344,7 @@ var requirejs, require, define, xpcUtil;
function eachProp(obj, func) {
var prop;
for (prop in obj) {
if (hasProp(obj, prop)) {
if (hasProp(obj, prop) && disallowedProps.indexOf(prop) == -1) {
if (func(obj[prop], prop)) {
break;
}
Expand Down
5 changes: 3 additions & 2 deletions require.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ var requirejs, require, define;
contexts = {},
cfg = {},
globalDefQueue = [],
useInteractive = false;
useInteractive = false,
disallowedProps = ['__proto__', 'constructor'];

//Could match something like ')//comment', do not lose the prefix to comment.
function commentReplace(match, singlePrefix) {
Expand Down Expand Up @@ -94,7 +95,7 @@ var requirejs, require, define;
function eachProp(obj, func) {
var prop;
for (prop in obj) {
if (hasProp(obj, prop)) {
if (hasProp(obj, prop) && disallowedProps.indexOf(prop) == -1) {
if (func(obj[prop], prop)) {
break;
}
Expand Down

0 comments on commit ecc356a

Please sign in to comment.