minor tweak...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-08-23 06:28:17 +03:00
parent 2fc4cffa85
commit 33ef833a31

View File

@ -1953,15 +1953,14 @@ var BaseBrowserPrototype = {
: lst } : lst }
// stopping mechanics... // stopping mechanics...
var res var res, StopException
var Stop = context.stop ?
null
: new Error('walk2(..): Stop.')
var stop = context.stop = var stop = context.stop =
context.stop context.stop
|| function(r){ || function(r){
res = r res = r
throw Stop } throw StopException }
.run(function(){
StopException = new Error('walk2(..): StopException.') })
try { try {
var map var map
@ -2014,9 +2013,9 @@ var BaseBrowserPrototype = {
: [], ] }) : [], ] })
.flat() .flat()
// handle Stop and errors... // handle StopException and errors...
} catch(e){ } catch(e){
if(e === Stop){ if(e === StopException){
return res } return res }
throw e } }, throw e } },