浏览代码

Added new version check for bootstrap 5

Dustin Utecht 5 年之前
父节点
当前提交
b3b2e6e1d3
共有 1 个文件被更改,包括 10 次插入0 次删除
  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',