regenerator-babel
Advanced tools
Comparing version 0.8.10-2 to 0.8.13-1
@@ -19,3 +19,3 @@ { | ||
], | ||
"version": "0.8.10-2", | ||
"version": "0.8.13-1", | ||
"homepage": "http://github.com/facebook/regenerator", | ||
@@ -22,0 +22,0 @@ "repository": { |
@@ -442,23 +442,29 @@ /** | ||
_findFinallyEntry: function(finallyLoc) { | ||
abrupt: function(type, arg) { | ||
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | ||
var entry = this.tryEntries[i]; | ||
if (entry.tryLoc <= this.prev && | ||
hasOwn.call(entry, "finallyLoc") && ( | ||
entry.finallyLoc === finallyLoc || | ||
this.prev < entry.finallyLoc)) { | ||
return entry; | ||
hasOwn.call(entry, "finallyLoc") && | ||
this.prev < entry.finallyLoc) { | ||
var finallyEntry = entry; | ||
break; | ||
} | ||
} | ||
}, | ||
abrupt: function(type, arg) { | ||
var entry = this._findFinallyEntry(); | ||
var record = entry ? entry.completion : {}; | ||
if (finallyEntry && | ||
(type === "break" || | ||
type === "continue") && | ||
finallyEntry.tryLoc <= arg && | ||
arg < finallyEntry.finallyLoc) { | ||
// Ignore the finally entry if control is not jumping to a | ||
// location outside the try/catch block. | ||
finallyEntry = null; | ||
} | ||
var record = finallyEntry ? finallyEntry.completion : {}; | ||
record.type = type; | ||
record.arg = arg; | ||
if (entry) { | ||
this.next = entry.finallyLoc; | ||
if (finallyEntry) { | ||
this.next = finallyEntry.finallyLoc; | ||
} else { | ||
@@ -490,4 +496,8 @@ this.complete(record); | ||
finish: function(finallyLoc) { | ||
var entry = this._findFinallyEntry(finallyLoc); | ||
return this.complete(entry.completion, entry.afterLoc); | ||
for (var i = this.tryEntries.length - 1; i >= 0; --i) { | ||
var entry = this.tryEntries[i]; | ||
if (entry.finallyLoc === finallyLoc) { | ||
return this.complete(entry.completion, entry.afterLoc); | ||
} | ||
} | ||
}, | ||
@@ -494,0 +504,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79497
2134