Browse Source

Added new version check for bootstrap 5

Dustin Utecht 5 years ago
parent
commit
b3b2e6e1d3
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/constants/index.js

+ 10 - 0
src/constants/index.js

@@ -13,6 +13,16 @@ try {
   // ignore
 }
 
+try {
+  // eslint-disable-next-line no-undef
+  const rawVersion = bootstrap.Tooltip.VERSION
+  if (rawVersion !== undefined) {
+    bootstrapVersion = parseInt(rawVersion, 10)
+  }
+} catch (e) {
+  // ignore
+}
+
 const CONSTANTS = {
   3: {
     iconsPrefix: 'glyphicon',