|
|
@@ -1,9 +1,11 @@
|
|
|
import getMeta from '@/utils/meta'
|
|
|
|
|
|
-export const isBootstrap5 = getMeta('ol-bootstrapVersion') === 5
|
|
|
+// The reason this is a function to ensure that meta tag is read before any
|
|
|
+// isBootstrap5 check is performed
|
|
|
+export const isBootstrap5 = () => getMeta('ol-bootstrapVersion') === 5
|
|
|
|
|
|
export const bsVersion = ({ bs5, bs3 }: { bs5?: string; bs3?: string }) => {
|
|
|
- return isBootstrap5 ? bs5 : bs3
|
|
|
+ return isBootstrap5() ? bs5 : bs3
|
|
|
}
|
|
|
|
|
|
// get all `aria-*` and `data-*` attributes
|