Bläddra i källkod

Rename 'continue' -> '_continue'.

PotcFdk 6 år sedan
förälder
incheckning
f460f9420f
2 ändrade filer med 8 tillägg och 8 borttagningar
  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