Permalink
Browse files

make flow.exec work in browser environments, too

  • Loading branch information...
1 parent 4e5fe12 commit 8bfa201e267c18ce91ded6600b5cb22ded001ac6 @siebertm siebertm committed with May 26, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 flow.js
View
@@ -93,7 +93,8 @@
// defines a flow and evaluates it immediately. The first flow function won't receive any arguments.
function exec() {
- applyArgs(exports.define, exports, arguments)();
+ var flow = typeof exports != 'undefined' ? exports : window.flow;
+ applyArgs(flow.define, flow, arguments)();
}
// a very useful flow for serial execution of asynchronous functions over a list of values

0 comments on commit 8bfa201

Please sign in to comment.