Forráskód Böngészése

check for Performance object capabilities

Alexander Rose 5 éve
szülő
commit
29b6a88343
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/mol-task/util/user-timing.ts

+ 1 - 1
src/mol-task/util/user-timing.ts

@@ -7,7 +7,7 @@
 import { Task } from '../task'
 import { isProductionMode } from '../../mol-util/debug';
 
-const hasPerformance = typeof performance !== 'undefined'
+const hasPerformance = (typeof performance !== 'undefined') && performance.mark && performance.measure
 const timingEnabled = hasPerformance && !isProductionMode
 
 export namespace UserTiming {