You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by nk...@apache.org on 2019/06/13 06:29:04 UTC

[pulsar-client-node] 27/36: fix conditions

This is an automated email from the ASF dual-hosted git repository.

nkurihar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-node.git

commit 25c1f761c0d06482e7e400b4febf2eb70d9faa30
Author: yfuruta <yf...@yahoo-corp.jp>
AuthorDate: Tue Jun 11 19:08:19 2019 +0900

    fix conditions
---
 .vscode/ipch/cc6423c2fd8ec533/mmap_address.bin | Bin 0 -> 8 bytes
 src/Reader.cc                                  |   6 +++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.vscode/ipch/cc6423c2fd8ec533/mmap_address.bin b/.vscode/ipch/cc6423c2fd8ec533/mmap_address.bin
new file mode 100644
index 0000000..71307ab
Binary files /dev/null and b/.vscode/ipch/cc6423c2fd8ec533/mmap_address.bin differ
diff --git a/src/Reader.cc b/src/Reader.cc
index cfca247..8118628 100644
--- a/src/Reader.cc
+++ b/src/Reader.cc
@@ -149,10 +149,10 @@ Napi::Value Reader::HasNext(const Napi::CallbackInfo &info) {
   if (result != pulsar_result_Ok) {
     Napi::Error::New(info.Env(), "Failed to check if next message is available").ThrowAsJavaScriptException();
     return Napi::Boolean::New(info.Env(), false);
-  } else if (value != 1) {
-    return Napi::Boolean::New(info.Env(), false);
-  } else {
+  } else if (value == 1) {
     return Napi::Boolean::New(info.Env(), true);
+  } else {
+    return Napi::Boolean::New(info.Env(), false);
   }
 }