using process.browser instead of type window

This commit is contained in:
javi 2014-12-04 17:29:15 +01:00
parent ae111041dd
commit 146976c8a3

View File

@ -4,7 +4,7 @@ var util = require('util'),
function getVersion() {
if (typeof(this['window']) !== undefined) {
if (process.browser) {
return require('../../package.json').version.split('.');
} else if (parseInt(process.version.split('.')[1], 10) > 4) {
return require('../../package.json').version.split('.');