Przeglądaj źródła

improve npm header for browser + nodejs compatibility.

Ben Houston 12 lat temu
rodzic
commit
3b8609e1c4
1 zmienionych plików z 1 dodań i 1 usunięć
  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 () {