Skip to content

Commit

Permalink
fix: global ctx error with typeof
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Jan 9, 2021
1 parent 49486a9 commit 8d516cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

(function () {
var global = global || window || Function('return this')();
var global = typeof window !== 'undefined' ? window : this || Function('return this')();
var nx = global.nx || require('@jswork/next');
var NUMBER = 'number';
var DATABASE = {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function () {
var global = global || window || Function('return this')();
var global = typeof window !== 'undefined' ? window : this || Function('return this')();
var nx = global.nx || require('@jswork/next');
var NUMBER = 'number';
var DATABASE = {
Expand Down

0 comments on commit 8d516cb

Please sign in to comment.