Prevent CVAT failure when web analytics is failure (#2172)

* Prevent CVAT failure when web analytics is failure

* Updated UI version
main
Boris Sekachev 6 years ago committed by GitHub
parent 5ba88d5442
commit c2b17a0b34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,6 @@
{ {
"name": "cvat-ui", "name": "cvat-ui",
"version": "1.9.4", "version": "1.9.5",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

@ -1,6 +1,6 @@
{ {
"name": "cvat-ui", "name": "cvat-ui",
"version": "1.9.4", "version": "1.9.5",
"description": "CVAT single-page application", "description": "CVAT single-page application",
"main": "src/index.tsx", "main": "src/index.tsx",
"scripts": { "scripts": {

@ -20,6 +20,11 @@ export function customWaViewHit(pageName?: string, queryString?: string, hashInf
`if (typeof ${waHitFunctionName} === 'function') { `if (typeof ${waHitFunctionName} === 'function') {
${waHitFunctionName}(pageName, queryString, hashInfo); ${waHitFunctionName}(pageName, queryString, hashInfo);
}`); }`);
waHitFunction(pageName, queryString, hashInfo); try {
waHitFunction(pageName, queryString, hashInfo);
} catch (error) {
// eslint-disable-next-line
console.error(`Web analitycs hit function has failed. ${error.toString()}`);
}
} }
} }

Loading…
Cancel
Save