баг-фикс 30/34
This commit is contained in:
13
frontend/telemetry.js
Normal file
13
frontend/telemetry.js
Normal file
@@ -0,0 +1,13 @@
|
||||
let telemetryPromise = null;
|
||||
|
||||
export function initializeTelemetry() {
|
||||
if (['localhost', '127.0.0.1', '::1'].includes(window.location.hostname)) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
if (!telemetryPromise) {
|
||||
telemetryPromise = import('/vendor/otel.js').catch(error => {
|
||||
console.warn('Не удалось инициализировать браузерную телеметрию');
|
||||
});
|
||||
}
|
||||
return telemetryPromise;
|
||||
}
|
||||
Reference in New Issue
Block a user