Last active
July 2, 2021 18:17
-
-
Save neodigm/74234859cbc5dbb9f7a889fb7971e560 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Dive into DOM to access Vuex array from mixin | |
export function getFeatureDOM(feature) { | |
// Return Feature Flag if it exists for current user | |
const features = document.querySelector('DIV#app').__vue__.$store.state.auth | |
.currentUser.activeFeatures | |
return features ? features.filter((fe) => fe === feature)[0] : null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment