ACS-8770: fix for "this" resolving after migrate from static methods

This commit is contained in:
Anton Ramanovich
2025-07-21 13:36:17 +02:00
parent c1e8ac3f9a
commit e6b1d06149
@@ -332,7 +332,9 @@ export class AdfHttpClient implements ee.Emitter, JsApiHttpClient {
private createCSRFToken(a?: any): string {
const randomValue = this.getSecureRandomValue();
return a ? (a ^ ((randomValue * 16) >> (a / 4))).toString(16) : ([1e16] + (1e16).toString()).replace(/[01]/g, this.createCSRFToken);
return a
? (a ^ ((randomValue * 16) >> (a / 4))).toString(16)
: ([1e16] + (1e16).toString()).replace(/[01]/g, this.createCSRFToken.bind(this));
}
private getSecureRandomValue(): number {