Files
discord-decomp/_bundle/Module1105.js
T
2026-11-01 12:12:55 +02:00

27 lines
1.1 KiB
JavaScript

// Metro module 1105 (f1106).
import { _INTERNAL_insertFlagToScope, _INTERNAL_addFeatureFlagToActiveSpan, debug, defineIntegration, fill, _INTERNAL_copyFlagsFromScopeToEvent } from "./Module817";
import { DEBUG_BUILD } from "./Module1072";
const _wrappedIsEnabled = function _wrappedIsEnabled(c12801_0) {
return function(...args) {
const r5 = args[0];
const r23 = c12801_0.apply(this, args);
if (typeof r5 === "string" && typeof r23 === "boolean") {
_INTERNAL_insertFlagToScope(r5, r23);
_INTERNAL_addFeatureFlagToActiveSpan(r5, r23);
} else if (DEBUG_BUILD) {
debug.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${r5} (${typeof r5}), result: ${r23} (${typeof r23})`);
}
return r23;
};
};
Object.defineProperty(exports, Symbol.toStringTag, {
value: "Module"
});
export const unleashIntegration = defineIntegration(({ featureFlagClientClass }) => ({
name: "Unleash",
setupOnce: () => {
fill(featureFlagClientClass.prototype, "isEnabled", _wrappedIsEnabled);
},
processEvent: (a0, a1, a2) => _INTERNAL_copyFlagsFromScopeToEvent(a0)
}));