From c1fdb0e21809ddacf528c24e51a0176ea7ca2730 Mon Sep 17 00:00:00 2001 From: Dion Amago Date: Sun, 8 Jul 2018 20:27:43 -0700 Subject: [PATCH] Sanity check for existence of object before assigning a key --- bin/dump.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/dump.js b/bin/dump.js index ebf0180..02b3ff0 100644 --- a/bin/dump.js +++ b/bin/dump.js @@ -305,7 +305,7 @@ }; } ttl = parseInt(ttls[i], 10); - if (!isNaN(ttl) && ttl !== -1) { + if (!isNaN(ttl) && ttl !== -1 && json[key]) { json[key].ttl = ttl; } }