| 1 |
"use strict"; |
| 2 |
|
| 3 |
var esEnvType = require("./es-env-type"); |
| 4 |
|
| 5 |
switch (esEnvType) { |
| 6 |
case "3": |
| 7 |
if (EvalError.$ug202109) { |
| 8 |
module.exports = EvalError.$ug202109; |
| 9 |
return; |
| 10 |
} |
| 11 |
module.exports = EvalError.$ug202109 = {}; |
| 12 |
return; |
| 13 |
case "5": |
| 14 |
if (EvalError.$uniGlobal202109) { |
| 15 |
module.exports = EvalError.$uniGlobal202109; |
| 16 |
return; |
| 17 |
} |
| 18 |
Object.defineProperty(EvalError, "$uniGlobal202109", { |
| 19 |
value: (module.exports = Object.create(null)) |
| 20 |
}); |
| 21 |
return; |
| 22 |
case "2015+": |
| 23 |
var uniGlobalSymbol = Symbol["for"]("$uniGlobal202109"); |
| 24 |
if (EvalError[uniGlobalSymbol]) { |
| 25 |
module.exports = EvalError[uniGlobalSymbol]; |
| 26 |
return; |
| 27 |
} |
| 28 |
Object.defineProperty(EvalError, uniGlobalSymbol, { |
| 29 |
value: (module.exports = Object.create(null)) |
| 30 |
}); |
| 31 |
return; |
| 32 |
default: |
| 33 |
throw new Error("Unrecognized environment type: " + esEnvType); |
| 34 |
} |