handle getSubdomain error

This commit is contained in:
Girish Ramakrishnan
2015-10-29 16:26:56 -07:00
parent ddded0ebfb
commit 3fa50f2a1a
+2
View File
@@ -75,6 +75,8 @@ function updateSubdomain(zoneName, subdomain, type, value, callback) {
assert.strictEqual(typeof callback, 'function');
getSubdomain(zoneName, subdomain, type, function (error, values) {
if (error) return callback(error);
if (values[0] === value) return callback();
addSubdomain(zoneName, subdomain, type, value, callback);