Skip to content

Commit

Permalink
fix: make linter happy with if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-bansil authored and ethanneff committed Nov 16, 2016
1 parent a6e964f commit b6baa37
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions www.es6/branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,20 @@ function onBranchLinkStub(data) {
* @return (Promise)
*/
Branch.prototype.initSession = function(onBranchLinkHook) {
if(!onBranchLinkHook && !disableGlobalListenersWarnings) {
if (!onBranchLinkHook && !disableGlobalListenersWarnings) {
console.log('WARNING: branch link hook is not being passed to initSession. ' +
'Falling back to global DeepLinkHandler method. See https://goo.gl/GijGKP for details.');
} else {
var currentHook = window.DeepLinkHandler;
if(currentHook !== undefined && currentHook !== onBranchLinkStub) {
if(!disableGlobalListenersWarnings) {
if (currentHook !== undefined && currentHook !== onBranchLinkStub) {
if (!disableGlobalListenersWarnings) {
console.log('WARNING: you are calling initSession with a branch link hook when an ' +
'existing global DeepLinkHandler is defined. The global ' +
'DeepLinkHandler will be overwritten. See https://goo.gl/GijGKP ' +
'for details.');
}
}
if(onBranchLinkHook) {
if (onBranchLinkHook) {
branchLinkListener = onBranchLinkHook;
window.DeepLinkHandler = onBranchLinkStub;
}
Expand All @@ -112,13 +112,13 @@ function onNonBranchLinkStub(data) {
* Register listener for non branch links.
*/
Branch.prototype.onNonBranchLink = function(newHook) {
if(!hook) {
if (!hook) {
throw new Error('non branch link hook is falsy, expected a function, not: "' + hook + '"');
}

var currentHook = window.NonBranchLinkHandler;
if(currentHook !== undefined && currentHook !== onNonBranchLinkStub) {
if(!disableGlobalListenersWarnings) {
if (currentHook !== undefined && currentHook !== onNonBranchLinkStub) {
if (!disableGlobalListenersWarnings) {
console.log('WARNING: you are calling onNonBranchLink when an ' +
'existing global NonBranchLinkHandler is defined. The global ' +
'NonBranchLinkHandler will be overwritten. See https://goo.gl/GijGKP ' +
Expand Down

0 comments on commit b6baa37

Please sign in to comment.