removed AMD 'define' call, since when bundled with other modules, only the first define() call actually registers the module (which would be one of the dependencies)
This commit is contained in:
17
dist/xss.js
vendored
17
dist/xss.js
vendored
@@ -442,14 +442,6 @@ for (var i in DEFAULT) exports[i] = DEFAULT[i];
|
||||
for (var i in parser) exports[i] = parser[i];
|
||||
|
||||
|
||||
|
||||
// 在AMD下使用
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(function () {
|
||||
return module.exports;
|
||||
});
|
||||
}
|
||||
|
||||
// 在浏览器端使用
|
||||
if (typeof window !== 'undefined') {
|
||||
window.filterXSS = module.exports;
|
||||
@@ -1426,15 +1418,6 @@ exports = module.exports = filterCSS;
|
||||
exports.FilterCSS = FilterCSS;
|
||||
for (var i in DEFAULT) exports[i] = DEFAULT[i];
|
||||
|
||||
|
||||
|
||||
// 在AMD下使用
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(function () {
|
||||
return module.exports;
|
||||
});
|
||||
}
|
||||
|
||||
// 在浏览器端使用
|
||||
if (typeof window !== 'undefined') {
|
||||
window.filterCSS = module.exports;
|
||||
|
||||
2
dist/xss.min.js
vendored
2
dist/xss.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -29,14 +29,6 @@ for (var i in DEFAULT) exports[i] = DEFAULT[i];
|
||||
for (var i in parser) exports[i] = parser[i];
|
||||
|
||||
|
||||
|
||||
// 在AMD下使用
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(function () {
|
||||
return module.exports;
|
||||
});
|
||||
}
|
||||
|
||||
// 在浏览器端使用
|
||||
if (typeof window !== 'undefined') {
|
||||
window.filterXSS = module.exports;
|
||||
|
||||
Reference in New Issue
Block a user