From 154f525e529f218171b1641391944a3d7aa645e8 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Tue, 29 Oct 2019 18:13:16 +0000 Subject: [PATCH] [CodeFactor] Apply fixes --- src/static/scripts/bootstrap-native-v4.js | 14 +++++++------- src/static/scripts/md5.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/static/scripts/bootstrap-native-v4.js b/src/static/scripts/bootstrap-native-v4.js index e0cdf3a5..d31ef20e 100644 --- a/src/static/scripts/bootstrap-native-v4.js +++ b/src/static/scripts/bootstrap-native-v4.js @@ -1282,7 +1282,7 @@ if ( !!element && !(stringModal in element) ) { on(element, clickEvent, clickHandler); } - if ( !!self[content] ) { self.setContent( self[content] ); } + if ( self[content] ) { self.setContent( self[content] ); } if (element) { element[stringModal] = self; modal[modalTrigger] = element; } else { modal[stringModal] = self; } }; @@ -1372,7 +1372,7 @@ titleString = options.title || element[getAttribute](dataTitle); contentString = options.content || element[getAttribute](dataContent); // fixing https://github.com/thednp/bootstrap.native/issues/233 - contentString = !!contentString ? contentString.trim() : null; + contentString = contentString ? contentString.trim() : null; popover = DOC[createElement](div); @@ -1452,7 +1452,7 @@ updatePopover(); showPopover(); bootstrapCustomEvent.call(element, showEvent, component); - !!self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger(); + self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger(); } }, 20 ); }; @@ -1462,7 +1462,7 @@ if (popover && popover !== null && hasClass(popover,showClass)) { bootstrapCustomEvent.call(element, hideEvent, component); removeClass(popover,showClass); - !!self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger(); + self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger(); } }, self[delay] ); }; @@ -1516,7 +1516,7 @@ for (var i=0, il=links[length]; i