diff --git a/.gitattributes b/.gitattributes index 4d4d7ef..c398f7b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ -* text = auto \ No newline at end of file +#https://help.github.com/articles/dealing-with-line-endings#per-repository-settings +* text=auto \ No newline at end of file diff --git a/src/Flow.js b/src/Flow.js index 9545109..ab96150 100644 --- a/src/Flow.js +++ b/src/Flow.js @@ -322,6 +322,14 @@ p.reset = function () { this.index = -1; + + each(this.steps, function (step) { + if (isFlow(step)) { + step.reset(); + } + }); + + return this; }; // Run this step and keep current process diff --git a/src/Flow_underscore.js b/src/Flow_underscore.js index 232b96f..f4766ac 100644 --- a/src/Flow_underscore.js +++ b/src/Flow_underscore.js @@ -245,6 +245,14 @@ p.reset = function () { this.index = -1; + + each(this.steps, function (step) { + if (isFlow(step)) { + step.reset(); + } + }); + + return this; }; // Run this step and keep current process