Merge branch 'master' of https://github.com/leizongmin/js-xss
This commit is contained in:
@@ -32,7 +32,7 @@ if (typeof window !== "undefined") {
|
||||
|
||||
// using `xss` on the WebWorker, output `filterXSS` to the globals
|
||||
function isWorkerEnv() {
|
||||
return typeof self !== 'undefined' && self instanceof DedicatedWorkerGlobalScope;
|
||||
return typeof self !== 'undefined' && typeof DedicatedWorkerGlobalScope !== 'undefined' && self instanceof DedicatedWorkerGlobalScope;
|
||||
}
|
||||
if (isWorkerEnv()) {
|
||||
self.filterXSS = module.exports;
|
||||
|
||||
Reference in New Issue
Block a user