83 lines
3.9 KiB
React
83 lines
3.9 KiB
React
/* Metro module 1025; source: unknown; dependencies: [1005, 826, 1026, 1028, 1029, 1030, 825] */
|
|
function _fun10700(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#10700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1152:6, offset: 0x00d94051, size: 105 bytes, params: 8, frame: 17
|
|
const env0_0 = require;
|
|
const closure = function() {
|
|
return require(dependencyMap[4]);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.polyfillPromise = polyfillPromise;
|
|
exports.getPromisePolyfill = closure;
|
|
exports.requireRejectionTracking = function() {
|
|
return require(dependencyMap[5]);
|
|
};
|
|
exports.checkPromiseAndWarn = checkPromiseAndWarn;
|
|
}
|
|
|
|
function polyfillPromise() { // fn#10702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1152:158, offset: 0x00d940ba, size: 173 bytes, params: 1, frame: 16
|
|
const ReactNativeLibraries = (require(1005) /* metro dependency 1005 */).ReactNativeLibraries;
|
|
const Utilities = ReactNativeLibraries.Utilities;
|
|
if (Utilities) {
|
|
var env0_0 = getPromisePolyfill();
|
|
require(1026) /* metro dependency 1026 */;
|
|
require(1028) /* metro dependency 1028 */;
|
|
ReactNativeLibraries.Utilities.polyfillGlobal('Promise', _fun10703);
|
|
} else {
|
|
(require(826) /* metro dependency 826 */).debug.warn('Could not polyfill Promise. React Native Libraries Utilities not found.');
|
|
}
|
|
}
|
|
|
|
function checkPromiseAndWarn() { // fn#10705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1152:603, offset: 0x00d94182, size: 279 bytes, params: 1, frame: 15
|
|
var value;
|
|
var property;
|
|
var moduleValue;
|
|
var ReactNativeLibraries;
|
|
var Promise;
|
|
var moduleValue2;
|
|
var promisePolyfill;
|
|
var value3;
|
|
var moduleValue3;
|
|
var debug;
|
|
var moduleValue4;
|
|
var RN_GLOBAL_OBJ;
|
|
var value4;
|
|
var moduleValue5;
|
|
var moduleValue6;
|
|
var error;
|
|
try {
|
|
value = environment;
|
|
property = dependencyMap[0];
|
|
moduleValue = require(property);
|
|
ReactNativeLibraries = moduleValue.ReactNativeLibraries;
|
|
Promise = ReactNativeLibraries.Promise;
|
|
property = dependencyMap[4];
|
|
moduleValue2 = require(property);
|
|
promisePolyfill = getPromisePolyfill();
|
|
value3 = Promise === moduleValue2;
|
|
if (!value3) {
|
|
moduleValue3 = require(dependencyMap[1]);
|
|
moduleValue3.debug.warn('You appear to have multiple versions of the "promise" package installed. This may cause unexpected behavior like undefined `Promise.allSettled`. Please install the `promise` package manually using the exact version as the React Native package. See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.');
|
|
}
|
|
property = dependencyMap[6];
|
|
moduleValue4 = require(property);
|
|
RN_GLOBAL_OBJ = moduleValue4.RN_GLOBAL_OBJ;
|
|
Promise = RN_GLOBAL_OBJ.Promise;
|
|
value4 = promisePolyfill !== Promise;
|
|
if (value4) {
|
|
property = dependencyMap[1];
|
|
moduleValue6 = require(property);
|
|
debug = moduleValue6.debug;
|
|
debug.warn('Unhandled promise rejections will not be caught by Sentry. See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.');
|
|
} else {
|
|
property = dependencyMap[1];
|
|
moduleValue5 = require(property);
|
|
debug = moduleValue5.debug;
|
|
debug.log('Unhandled promise rejections will be caught by Sentry.');
|
|
}
|
|
} catch (error) {
|
|
debug = require(dependencyMap[1]).debug;
|
|
debug.warn('Unhandled promise rejections will not be caught by Sentry. See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.');
|
|
}
|
|
}
|
|
|