mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(util) change the way of detection node.js
This commit is contained in:
parent
f68b982c82
commit
f248207dfe
1 changed files with 5 additions and 8 deletions
13
lib/util.js
13
lib/util.js
|
|
@ -6,15 +6,12 @@
|
|||
(function(scope) {
|
||||
'use strict';
|
||||
|
||||
var Scope;
|
||||
var Scope = scope.window ? window : global;
|
||||
|
||||
if (scope.window) {
|
||||
Scope = window;
|
||||
Scope.Util = new UtilProto();
|
||||
} else {
|
||||
Scope = global;
|
||||
module.exports = new UtilProto();
|
||||
}
|
||||
if (typeof module === 'object' && module.exports)
|
||||
module.exports = new UtilProto();
|
||||
else
|
||||
Scope.Util = new UtilProto();
|
||||
|
||||
function UtilProto() {
|
||||
var Util = this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue