Skip to content

Commit 565c60b

Browse files
committed
update for simpler import/export till a better solution is the standard
1 parent a4c9d24 commit 565c60b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/simple-middleware.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
/* jshint asi:true */
22
;(function () {
33

4-
var compose = typeof require !== "undefined"? require("../../compose-simple-middleware/src/compose-simple-middleware.js") : window['module:peey/compose-simple-middleware'] ;
4+
/* importing */
5+
var compose = typeof require !== "undefined"? require("compose-simple-middleware") : window.composeMiddleware ;
56

7+
/* actual code */
68
var Middleware = function () {
79
this.context = {}
810
this.list = []
@@ -26,8 +28,7 @@
2628

2729
// for browsers
2830
if (typeof window !== "undefined") {
29-
window['module:peey/simple-middleware'] = Middleware
30-
if (typeof window.composeMiddleware === "undefined") window.Middleware = Middleware ; // don't overwrite variable if it exists
31+
window.Middleware = Middleware;
3132
}
3233

3334
})();

0 commit comments

Comments
 (0)