Skip to content

Commit

Permalink
Merge pull request #1016 from requirejs/jr/1854-pollution
Browse files Browse the repository at this point in the history
Fixes requirejs/requirejs#1854, pollution
  • Loading branch information
jrburke authored Jul 20, 2024
2 parents acec536 + ecc356a commit 152f450
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, https://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 152f450

Please sign in to comment.