From 89dc1dc2342e9e221f695cd74f0f5a7e37bc0dce Mon Sep 17 00:00:00 2001 From: Alex Austin Date: Wed, 21 Sep 2016 15:42:29 -0700 Subject: [PATCH] fix: update actual branch.js --- www.es6/branch.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/www.es6/branch.js b/www.es6/branch.js index 7887db77..86de7988 100644 --- a/www.es6/branch.js +++ b/www.es6/branch.js @@ -85,6 +85,24 @@ Branch.prototype.setMixpanelToken = function(token) { }; +/** + * Set debug mode to simulate fresh installs. + * NOTE: This must be called before initSession + * + * @param (Boolean) isEnabled. Default = false + * + * @return (Promise) + */ +Branch.prototype.setDebug = function (isEnabled) { + + isEnabled = (typeof isEnabled !== 'boolean') ? false : isEnabled; + + this.debugMode = isEnabled; + + return execute('setDebug', [isEnabled]); + +}; + /** * Retrieves the install session parameters. *