Parcourir la source

Merge pull request #35 from Metastruct/patch-1

Rename 'continue' -> '_continue'.
Bjorn Swenson il y a 6 ans
Parent
commit
3e2786130e
2 fichiers modifiés avec 8 ajouts et 8 suppressions
  1. 4 4
      rx.lua
  2. 4 4
      src/operators/catch.lua

+ 4 - 4
rx.lua

@@ -450,12 +450,12 @@ function Observable:catch(handler)
         return observer:onCompleted()
         return observer:onCompleted()
       end
       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
         if subscription then subscription:unsubscribe() end
-        continue:subscribe(observer)
+        _continue:subscribe(observer)
       else
       else
-        observer:onError(success and e or continue)
+        observer:onError(success and e or _continue)
       end
       end
     end
     end
 
 

+ 4 - 4
src/operators/catch.lua

@@ -21,12 +21,12 @@ function Observable:catch(handler)
         return observer:onCompleted()
         return observer:onCompleted()
       end
       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
         if subscription then subscription:unsubscribe() end
-        continue:subscribe(observer)
+        _continue:subscribe(observer)
       else
       else
-        observer:onError(success and e or continue)
+        observer:onError(success and e or _continue)
       end
       end
     end
     end