Skip to content

Commit

Permalink
Merge pull request #35 from Metastruct/patch-1
Browse files Browse the repository at this point in the history
Rename 'continue' -> '_continue'.
  • Loading branch information
bjornbytes authored Mar 1, 2019
2 parents b2c4522 + f460f94 commit 3e27861
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions rx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,12 @@ function Observable:catch(handler)
return observer:onCompleted()
end

local success, continue = pcall(handler, e)
if success and continue then
local success, _continue = pcall(handler, e)
if success and _continue then
if subscription then subscription:unsubscribe() end
continue:subscribe(observer)
_continue:subscribe(observer)
else
observer:onError(success and e or continue)
observer:onError(success and e or _continue)
end
end

Expand Down
8 changes: 4 additions & 4 deletions src/operators/catch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ function Observable:catch(handler)
return observer:onCompleted()
end

local success, continue = pcall(handler, e)
if success and continue then
local success, _continue = pcall(handler, e)
if success and _continue then
if subscription then subscription:unsubscribe() end
continue:subscribe(observer)
_continue:subscribe(observer)
else
observer:onError(success and e or continue)
observer:onError(success and e or _continue)
end
end

Expand Down

0 comments on commit 3e27861

Please sign in to comment.