From a7b5c9e3cf4fe51f803d47aae04f9caea1c18f56 Mon Sep 17 00:00:00 2001 From: Jason Olmstead Date: Thu, 15 Dec 2016 15:47:14 -0800 Subject: [PATCH] teaking out indexof --- src/github.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/github.js b/src/github.js index ae6a0d0..e3f005d 100644 --- a/src/github.js +++ b/src/github.js @@ -91,11 +91,7 @@ function mergeToMaster(repo, branch) { return Promise.resolve(); }) .catch(function (err) { - if (err.message.message.indexOf("409")) { - return Promise.reject("Conflict merging " + branch + "into master"); - } else { - return Promise.reject(err.message); - } + return Promise.reject(err.message); }) } @@ -143,11 +139,7 @@ function preCheck(repo, branch) { return Promise.resolve(); }) .catch(function(err){ - if (err.message.message.indexOf("409") > -1){ - return Promise.reject("Conflict merging master into " + branch); - } else { - return Promise.reject(err.message); - } + return Promise.reject(err.message); }) }