diff --git a/lib/consul/index.js b/lib/consul/index.js index 5985a84..853d98b 100644 --- a/lib/consul/index.js +++ b/lib/consul/index.js @@ -154,7 +154,7 @@ var diff_kvs = function(write_kvs, delete_kvs, candidate_kvs, existing_kvs) { if (idx === -1) { // key does not exist in the current tree, so we must add it. write_kvs.push(kv); - } else if (kv.value.toString() !== existing_kvs[idx].value) { + } else if (kv.value === null || kv.value.toString() !== existing_kvs[idx].value) { // key exists in the current tree, but has a different value, so we must update it. write_kvs.push(kv); existing_kvs.splice(idx, 1);