From 00156c7668c46bb0b692c26c2c7608f1060c60bb Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Mon, 17 Jan 2022 19:06:55 +0530 Subject: [PATCH] changes record comparison --- .envrc | 1 + utils/domain-service.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 000000000..4a4726a5c --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use_nix diff --git a/utils/domain-service.js b/utils/domain-service.js index 14112d484..ea39701d9 100644 --- a/utils/domain-service.js +++ b/utils/domain-service.js @@ -44,7 +44,8 @@ const recordToEmailMx = ({ name, address, priority }) => ({ priority, }) -const getHostKey = host => `${host.name}##${host.type}##${host.address}`; +const getHostKey = host => + `${host.name?.toLowerCase()}##${host.type.toLowerCase()}##${host.address?.toLowerCase()}`; const diffRecords = (oldRecords, newRecords) => { const isMatchingRecord = (a, b) => getHostKey(a) === getHostKey(b);