From e47b12bc47bfec8da25bf3a1dc614b54eff55763 Mon Sep 17 00:00:00 2001 From: Robin Cornett Date: Fri, 5 Aug 2016 13:09:31 -0400 Subject: [PATCH] Change early return in js --- includes/js/backstretch-set.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/js/backstretch-set.js b/includes/js/backstretch-set.js index b52db25..269f24c 100644 --- a/includes/js/backstretch-set.js +++ b/includes/js/backstretch-set.js @@ -1,4 +1,4 @@ -( function ( document, $, undefined ) { +;( function ( document, $, undefined ) { 'use strict'; var plugin = {}; @@ -51,9 +51,10 @@ $(document).ready(function () { plugin.params = typeof BackStretchVars === 'undefined' ? '' : BackStretchVars; - if ( typeof plugin.params !== 'undefined' ) { - plugin.init(); + if ( typeof plugin.params === 'undefined' ) { + return; } + plugin.init(); }); } )( document, jQuery );