@capillarytech/cap-ui-utils 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/GA/index.js +4 -5
  2. package/package.json +1 -1
package/GA/index.js CHANGED
@@ -67,11 +67,12 @@ const loadPerformanceTracking = module =>{
67
67
  // Time to Interactive metric is essentially how long it takes for a user to be able to interact with your site.
68
68
  // Time to Interactive is defined as the point at which the layout has stabilized, key webfonts are visible,
69
69
  // and the main thread is available enough to handle user input.
70
- ttiPolyfill.getFirstConsistentlyInteractive().then((tti = 0) => {
70
+ ttiPolyfill.getFirstConsistentlyInteractive().then(tti => {
71
+ const val = !tti ? 0 : tti;
71
72
  ReactGA.timing({
72
73
  category: "Time to Interactive",
73
74
  variable: module,
74
- value: Math.round(tti.toFixed(2))
75
+ value: Math.round((val).toFixed(2))
75
76
  })
76
77
  });
77
78
  }catch(e){
@@ -144,8 +145,6 @@ const getCallerName = () => {
144
145
  return nameTrace !== null ? nameTrace[1] || nameTrace[2] : '';
145
146
  }
146
147
 
147
-
148
-
149
148
  export default{
150
149
  initialize,
151
150
  timeTracker,
@@ -153,4 +152,4 @@ export default{
153
152
  routeTrackerWrapper,
154
153
  setCustomDimension,
155
154
  getCallerName,
156
- }
155
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capillarytech/cap-ui-utils",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "description": "Utility functions shared accross all the modules",
5
5
  "main": "index.js",
6
6
  "scripts": {