We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed14b49 commit 4d7630cCopy full SHA for 4d7630c
src/flow.js
@@ -1399,12 +1399,15 @@
1399
* @type {FlowChunk}
1400
*/
1401
Flow.FlowChunk = FlowChunk;
1402
-
1403
- window.Flow = Flow;
1404
1405
-})(window, document);
1406
1407
-// Node.js-style export for Node and Component
1408
-if (typeof module !== 'undefined') {
1409
- module.exports = window.Flow;
1410
-}
+
+ if (typeof module !== 'undefined') {
+ module.exports = Flow;
+ } else if (typeof define === "function" && define.amd) {
+ // AMD/requirejs: Define the module
+ define(function(){
+ return Flow;
+ });
+ } else {
1411
+ window.Flow = Flow;
1412
+ }
1413
+})(window, document);
0 commit comments