Skip to content

Commit

Permalink
Remove deferred.pipe
Browse files Browse the repository at this point in the history
Remove the debugging-statement and revert dist/doc

Remove deferred.pipe

Remove the debugging-statement and revert dist/doc
  • Loading branch information
Abraham Przewodnik committed Dec 10, 2020
1 parent 0a8ac0a commit 655db5e
Show file tree
Hide file tree
Showing 3 changed files with 197 additions and 138 deletions.
22 changes: 14 additions & 8 deletions src/parsley/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ var Base = function () {
Base.prototype = {
asyncSupport: true, // Deprecated

_pipeAccordingToValidationResult: function () {
var pipe = () => {
var r = $.Deferred();
if (true !== this.validationResult)
r.reject();
return r.resolve().promise();
};
return [pipe, pipe];
_pipeAccordingToValidationResult: function (deferred) {
return $.Deferred((newDefer) => {
const handle = () => {
var r = true === this.validationResult ?
$.Deferred().resolve():
$.Deferred().reject();
r.promise()
.progress(newDefer.notify)
.done(newDefer.resolve)
.fail(newDefer.reject)
}
deferred.done(handle)
deferred.fail(handle)
})
},

actualizeOptions: function () {
Expand Down
Loading

0 comments on commit 655db5e

Please sign in to comment.