Skip to content

Commit

Permalink
clean require()
Browse files Browse the repository at this point in the history
  • Loading branch information
bang590 committed May 29, 2015
1 parent 5899019 commit c1d67df
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions JSPatch/JSPatch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var global = this

;(function(){
var clsList = {}
var callbacks = {}
var localMethods = {}
var callbackID = 0
Expand Down Expand Up @@ -128,16 +127,13 @@ var global = this
}

var _require = function(clsName) {
global.__defineGetter__(clsName, function(){
return _require(clsName)
})
if (!clsList[clsName]) {
clsList[clsName] = {
if (!global[clsName]) {
global[clsName] = {
__isCls: 1,
__clsName: clsName
}
}
return clsList[clsName]
return global[clsName]
}

global.require = function(clsNames) {
Expand Down

0 comments on commit c1d67df

Please sign in to comment.