derafu-js 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tabs.js +9 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "derafu-js",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Why use a JS framework if we can do all from scratch?",
5
5
  "main": "src/derafu.js",
6
6
  "files": [
package/src/tabs.js CHANGED
@@ -89,7 +89,9 @@ Tabs.init = function () {
89
89
  */
90
90
  Tabs._injectStyles = function () {
91
91
  'use strict';
92
- if (document.getElementById('derafu-tabs-styles')) return;
92
+ if (document.getElementById('derafu-tabs-styles')) {
93
+ return;
94
+ }
93
95
  const style = document.createElement('style');
94
96
  style.id = 'derafu-tabs-styles';
95
97
  style.textContent =
@@ -121,8 +123,12 @@ Tabs._highlightElement = function (element, isCard) {
121
123
  : element.closest('.input-group') ||
122
124
  element.closest('.form-floating') ||
123
125
  element.parentElement;
124
- if (!target) return;
125
- if (isCard) target.classList.add('border-primary');
126
+ if (!target) {
127
+ return;
128
+ }
129
+ if (isCard) {
130
+ target.classList.add('border-primary');
131
+ }
126
132
  target.classList.add('deeplink-highlight');
127
133
  target.addEventListener(
128
134
  'animationend',