فهرست منبع

Fix bug with BehaviorSubjects and multiple return values;

bjorn 10 سال پیش
والد
کامیت
816046fb3e
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      rx.lua

+ 4 - 2
rx.lua

@@ -1264,7 +1264,9 @@ end
 -- if nothing has been emitted yet.
 -- @returns {*...}
 function BehaviorSubject:getValue()
-  return self.value and util.unpack(self.value)
+  if self.value then
+    return util.unpack(self.value)
+  end
 end
 
 return {
@@ -1276,4 +1278,4 @@ return {
   CooperativeScheduler = CooperativeScheduler,
   Subject = Subject,
   BehaviorSubject = BehaviorSubject
-}
+}