Explorar o código

improve npm header for browser + nodejs compatibility.

Ben Houston %!s(int64=12) %!d(string=hai) anos
pai
achega
3b8609e1c4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      utils/npm/header.js

+ 1 - 1
utils/npm/header.js

@@ -9,7 +9,7 @@ if( window.performance === undefined ) {
 
 }
 
-if( window.performance.now === undefined ) {
+if( ( window.performance.now === undefined ) && ( process !== undefined ) && ( process.hrtime !== undefined ) ) {
 
 	window.performance.now = function () {